Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366040

Summary: Two EMFBuilder Service instances for one PU
Product: [RT] Gemini.JPA Reporter: Gunnar Wagenknecht <gunnar>
Component: CoreAssignee: Michael Keith <michael.keith>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cvgaviao
Version: 1.0.0   
Target Milestone: 1.1.0 M1   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
debug log none

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).