Main Overview Wiki Issues Forum Build Fisheye
Issue Details (XML | Word | Printable)

Key: CMP-908
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Shay Banon
Reporter: Marcus Ilgner
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

JBossNativeJpaExtractor not compatible with JBoss 5

Created: 25/Nov/09 03:47 AM   Updated: 10/Dec/09 02:57 AM
Component/s: Compass::Gps
Affects Version/s: 2.2.0 GA
Fix Version/s: 2.3.0 beta1

File Attachments: 1. Text File JBossNativeJpaExtractor.patch (2 kB)

Environment: Compass running in JBoss 5 container

 Description  « Hide
The class InjectedEntityManagerFactory has apparently been moved to org.jboss.jpa.injection.InjectedEntityManagerFactory in JBoss 5.0.1.GA.
Modifying the import in JBossNativeJpaExtractor and replacing the JBoss lib file with jboss-jpa-deployers.jar from my JBoss installation did the trick for me.

Maybe separate JBoss4NativeJpaExtractor and JBoss5NativeJpaExtractor classes would be the most comfortable solution?

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Shay Banon added a comment - 04/Dec/09 04:05 AM
Is there a chance that a solution based on reflection will help here, so the same native extractor will work on both versions? Can you help with building one?

Marcus Ilgner added a comment - 04/Dec/09 05:48 AM
Good idea. I'll try to find some time during the upcoming weekend.

Marcus Ilgner added a comment - 04/Dec/09 03:53 PM
This patch should do the trick.
I could only test it on my JBoss 5 installation though, but since it's quite straightforward, I'm positive that it should work on older versions as intended.

Shay Banon added a comment - 10/Dec/09 02:57 AM
Committed to trunk. Needed to add another small change to autodetect jboss 5 without extra configuration.