If you download from here http://sourceforge.net/projects/datanucleus/files/datanucleus-accessplat form/3.0.1/datanucleus-accessplatform-rdbms-3.0.1.zip/download you will get a zip file that contains all the bundles you need (and more).
>From those you will need to install: datanucleus-api-jpa-*.jar datanucleus-core-*.jar datanucleus-rdbms-*.jar In our case we used JDO so we included jdo-api-*.jar, look at the site for what you need for JPA (maybe it's the geronimo-jpa*.jar?). Should be in the deps folder of the zip file. I think for MySQL you would have to run that outside OSGi unless you know of a Java port that runs in OSGi. When configuring Data Nucleus you just give it the connection URL to the database. We used H2 ourselves as that can be embedded in OSGi. I'm not really familiar with JPA so I can't help you there. I imagine the Data Nucleus site has some examples. David Humeniuk -----Original Message----- From: Shai Amar [mailto:[email protected]] Sent: Wednesday, September 21, 2011 11:15 AM To: [email protected] Subject: Re: OSGi JPA example Hi David It definitely looks like a good solution for me. I want to use the Data Nucleus JPA implementation. Can you give more more details? Such as which OSGi Data Nucleus bundles should I install? (I work with MySQL) How to configure the MySQL JDBC in OSGi Felix? is it also an OSGi bundle? Which transaction type should I use? JTA or RESOURCE_LOCAL ? Can you show me a client example that consumes the JPA service? Regards Shai Amar On Wed, Sep 21, 2011 at 2:53 PM, <[email protected]> wrote: > We just added JDO support to our application using Data Nucleus. As I > understand it, Data Nucleus also supports JPA so you should be able to > use it as well. For this you need some bundles from Data Nucleus (core, > rdbms, api-jpa?) plus a bundle for the JPA API itself (assuming JPA is > setup the same as JDO). > > Also, for Felix to work with Data Nucleus you will have to create an > implementation of the org.datanucleus.plugiun.PluginRegistry interface > for it to put all of the bundles together. They actually have it setup > to work with Equinox if you follow their tutorial. > > I can give you more info if this looks like a solution for you. > > David Humeniuk > > > -----Original Message----- > From: Shai Amar [mailto:[email protected]] > Sent: Wednesday, September 21, 2011 4:03 AM > To: [email protected] > Subject: OSGi JPA example > > Hi > > I have a simple problem and I hope that there is a simple solution. > I would like to use JPA in Felix and store data in a MySQL server. > I have been investigating this issue and I saw that there no simple > example > for this, also, the examples that exists do not work. > > Can anyone tell me what bundles do I need for JPA and MySQL and provide > a > simple example of how to use it? > > > -- > Regards > > Shai Amar > > Technologies manager, Founder > Krynnlance > www.krynnlance.com > www.backapps.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Regards Shai Amar Technologies manager, Founder Krynnlance www.krynnlance.com www.backapps.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

