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

Bug 331901

Summary: EntityManagerFactory(Builder) services are not registered under Felix
Product: [RT] Gemini.JPA Reporter: Nick Wilson <nickwi>
Component: CoreAssignee: Michael Keith <michael.keith>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Modified to better handle INSTALLED and ACTIVE bundles. none

Description Nick Wilson CLA 2010-12-06 09:34:31 EST
Created attachment 184603 [details]
Modified to better handle INSTALLED and ACTIVE bundles.

Tested with GeminiJPA 1.0.0M3 and Felix 3.0.6.

This is due to the PersistenceBundleExtender not handling bundles that are in the INSTALLED state. I've attached a possible fix that includes the following changes:

1. Modified the "bundleChanged( BundleEvent event )" method for STARTING bundles so that it calls tryAssigningPersistenceUnitsInBundle if the bundle has not yet been assigned.

2. Modified the "lookForExistingBundles()" method to handle bundles in the INSTALLED and ACTIVE states rather than trying to restart them.

NOTE: I have only tested this against Felix, not Equinox.
Comment 1 Michael Keith CLA 2010-12-06 11:04:38 EST
Moving to new bin location.
Comment 2 Michael Keith CLA 2010-12-16 17:16:31 EST
Caused by problem described in 331898

*** This bug has been marked as a duplicate of bug 331898 ***