Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » JPA setup present and future
JPA setup present and future [message #644283] Fri, 10 December 2010 11:37 Go to next message
Tin N/A is currently offline Tin N/AFriend
Messages: 46
Registered: December 2010
Member
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 #644351 is a reply to message #644283] Fri, 10 December 2010 16:33 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry SklyutFriend
Messages: 279
Registered: January 2010
Senior Member
Hi Tin,

All opinions expressed here are based on looking at gemini-jpa code without actually deploying it in Virgo.

Quote:

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!



I am planning to set-up a group of integration tests for virgo-jpa support. Hopeful to start on that work in 2 weeks. If you have any use-cases/requirements you would like to see addressed - please let us know.

I have not tried it - but it should be possible to deploy without jumping through too many hoops. Potential deployment point is in user region.
modifying org.eclipse.virgo.kernel.userregion.properties
to either add required bundles to baseBundles or to initialArtifacts properties. Tricky point here is that org.eclipse.gemini.jpa.weaving bundle is a framework extension fragment. Not sure how it will work with current implementation of nested frameworks (i.e. virgo 2.1.x). If you try it - please let us know and submit bugzilla issues.


Quote:

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?



There might be a clash with what spring instrumented TCCL will do. Needs to be tested again.

Quote:

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?



I don't think time will be wasted! If you run into issues, raise bugzilla issues and be loud - this will allow both virgo and gemini developers know how the products are being used and address your issues.


Regards,
Dmitry
Re: JPA setup present and future [message #645230 is a reply to message #644351] Thu, 16 December 2010 06:42 Go to previous messageGo to next message
Tin N/A is currently offline Tin N/AFriend
Messages: 46
Registered: December 2010
Member
Hi,

thanks for the reply.

Dmitry Sklyut wrote on Fri, 10 December 2010

I am planning to set-up a group of integration tests for virgo-jpa support. Hopeful to start on that work in 2 weeks. If you have any use-cases/requirements you would like to see addressed - please let us know.

I have not tried it - but it should be possible to deploy without jumping through too many hoops. Potential deployment point is in user region.
modifying org.eclipse.virgo.kernel.userregion.properties
to either add required bundles to baseBundles or to initialArtifacts properties. Tricky point here is that org.eclipse.gemini.jpa.weaving bundle is a framework extension fragment. Not sure how it will work with current implementation of nested frameworks (i.e. virgo 2.1.x). If you try it - please let us know and submit bugzilla issues.



That sounds very similar to how eclipselink is supposed to be setup in OSGi. I know Virgo scans the extensions in the "lib/" directory when starting (I did some editing on the MANIFEST.MF of the EclipseLink Equionx extension and messed it up so Virgo refused to start), so I'll start with that.

Quote:

I don't think time will be wasted! If you run into issues, raise bugzilla issues and be loud - this will allow both virgo and gemini developers know how the products are being used and address your issues.



OK, then since EclipseLink currently seems to be similar to Gemini JPA support, I'll start with that and come back to this thread with any questions (or interesting findings) I might run into.

[Updated on: Thu, 16 December 2010 06:43]

Report message to a moderator

Re: JPA setup present and future [message #660504 is a reply to message #644351] Fri, 18 March 2011 17:02 Go to previous messageGo to next message
Joel Rosi-Schwartz is currently offline Joel Rosi-SchwartzFriend
Messages: 624
Registered: July 2009
Location: London. England
Senior Member
Quote:
I am planning to set-up a group of integration tests for virgo-jpa support. Hopeful to start on that work in 2 weeks.


Hi Dmitry,

Did this testing get performed? If so would very much like to know how it worked out.

Thanks,
Joel
Re: JPA setup present and future [message #660766 is a reply to message #660504] Mon, 21 March 2011 14:09 Go to previous messageGo to next message
Dmitry Sklyut is currently offline Dmitry SklyutFriend
Messages: 279
Registered: January 2010
Senior Member
Unfortunately no. I did not get time to do it.

If you have specific use cases in mind, please post them here.
This way we would have some idea what community is looking for.

Regards,
Dmitry
Re: JPA setup present and future [message #675697 is a reply to message #644283] Wed, 01 June 2011 08:36 Go to previous message
Frieder Heugel is currently offline Frieder HeugelFriend
Messages: 61
Registered: October 2010
Location: Basel, CH
Member
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
Previous Topic:chaining Sprign's ContextRefreshedEvent to Virgo's OsgiBundleContextRefreshedEvent
Next Topic:Comparison - Virgo and JBoss
Goto Forum:
  


Current Time: Sun Dec 08 01:07:48 GMT 2024

Powered by FUDForum. Page generated in 0.03805 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top