JPA setup present and future [message #644283] |
Fri, 10 December 2010 06:37  |
Eclipse User |
|
|
|
Hi all,
I'd appreciate a few quick pointers/answers to the following questions to help me (and hopefully others) decide on the direction to take with setting up JPA with Virgo:
1. as I understand, Gemini JPA is where JPA is going in the future for OSGi. What approximate timeframe are we looking at for Gemini JPA to be usable in production work with Virgo? Can it be tried now and what to expect? If yes, any setup hints for Gemini JPA M2 + Virgo 2.1.0 are welcome!
2. Presently, EclipseLink provides Equinox OSGi integration via two fragments that enable weaving. How do those fragments cooperate with Spring's context weaving that is used for JTA support (both AspectJ-based and proxies) - any possibility for a potential problem there?
3. Is the time dedicated now to studying and making EclipseLink OSGi integration work wasted from the perspective of future direction that Gemini JPA is taking, or are they similar?
|
|
|
|
|
|
|
Re: JPA setup present and future [message #675697 is a reply to message #644283] |
Wed, 01 June 2011 04:36  |
Eclipse User |
|
|
|
Hi guys,
the following post is on behalf of a colleague of mine who cannot register himself (register is deactivated for whatever reason).
-----
Hi everyone,
the past few days I've been trying to get a small example of Gemini JPA using an Oracle database to work.
Here is what I've done so far:
1. Wrapped the oracle drivers into a bundle and put them inside my /repository/usr folder
2. Copied most of the DBAccess code for Derby and reused it for the Oracle driver (or else I would get DataSourceFactory not found exceptions)
3. Copied all of the required jars into the /repository/usr folder namely:
- javax.persistence
- org.eclipse.gemini.jpa
- org.eclipse.gemini.jpa.weaving
- org.eclipse.persistence.antlr
- org.eclipse.persistence.asm
- org.eclipse.persistence.core
- org.eclipse.persistence.jpa
- org.osgi.enterprise-4.2.0
- oracle.jdbc.driver
- oracle.jdbc.datasourcefactory
After that I deploy my sample client and entity into Virgo which generates either an "Persistence Unit not found for..." exception, which is mainly because the Gemini JPA bundles are not parsing my persistence.xml, or I get errors because the Gemini JPA weaving bundle is not resolved correctly. I can work around these errors by creating a plan which loads the weaving bundle before the jpa bundle and dropping it into the pickup directory. After I do that the entity gets created in my Oracle database and an EntityManager can be created.
I also tried to add the weaving bundle to the osgi framework as a hook the way it is done for AspectJ but without any luck.
If needed I can attach the projects as well as the driver I am using to connect to the database but for now I just want to know what the correct way would be for me to start the Gemini JPA bundle at Virgo startup.
Thanks in advance,
Sebastian
|
|
|
Powered by
FUDForum. Page generated in 0.05197 seconds