Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366040 - Two EMFBuilder Service instances for one PU
Summary: Two EMFBuilder Service instances for one PU
Status: RESOLVED FIXED
Alias: None
Product: Gemini.JPA
Classification: RT
Component: Core (show other bugs)
Version: 1.0.0   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.1.0 M1   Edit
Assignee: Michael Keith CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-08 09:14 EST by Gunnar Wagenknecht CLA
Modified: 2012-07-20 11:11 EDT (History)
1 user (show)

See Also:


Attachments
debug log (7.92 KB, text/plain)
2011-12-08 09:14 EST, Gunnar Wagenknecht CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gunnar Wagenknecht CLA 2011-12-08 09:14:50 EST
Created attachment 208093 [details]
debug log

I noticed that I get two EMFBuilder service instances when running my
JUnit tests. Which one should I use?

More than ONE EMF found for PU eclipselink.jpa.multitenancy.tests.

{org.osgi.service.jpa.EntityManagerFactoryBuilder}={osgi.managed.bundles=eclipselink.jpa.multitenancy.tests_1.0.0.qualifier,
osgi.unit.version=1.0.0.qualifier,
osgi.unit.name=eclipselink.jpa.multitenancy.tests,
osgi.unit.provider=org.eclipse.persistence.jpa.PersistenceProvider,
service.id=100}
{org.osgi.service.jpa.EntityManagerFactoryBuilder}={osgi.managed.bundles=eclipselink.jpa.multitenancy.tests_1.0.0.qualifier,
osgi.unit.version=1.0.0.qualifier,
osgi.unit.name=eclipselink.jpa.multitenancy.tests,
osgi.unit.provider=org.eclipse.persistence.jpa.PersistenceProvider,
service.id=105}


osgi> ss gemini

Framework is launched.

id	State       Bundle
203	ACTIVE      org.eclipse.gemini.dbaccess.derby_1.1.0.qualifier
204	RESOLVED    org.eclipse.gemini.dbaccess.samples_1.0.0.RELEASE
205	<<LAZY>>    org.eclipse.gemini.dbaccess.test_1.1.0.qualifier
206	ACTIVE      org.eclipse.gemini.dbaccess.util_1.1.0.qualifier
207	ACTIVE      org.eclipse.gemini.jpa_1.0.0.qualifier
208	RESOLVED    org.eclipse.gemini.jpa.samples_1.0.0.qualifier

osgi>
Comment 1 Michael Keith CLA 2012-03-20 17:46:23 EDT
It looks like a race condition that we get a starting event after we already see that a bundle is starting. Have added a fix for that particular condition and will assume this bug is fixed (unless you encounter it again at some point, then please reopen).