cschneider / Karaf-Tutorial

http://cschneider.github.io/Karaf-Tutorial/
Apache License 2.0
271 stars 305 forks source link

Not able to create the person dataSource db-examplejpa #30

Closed ujjwalam closed 6 years ago

ujjwalam commented 7 years ago

I am following the tutorial at: http://www.liquid-reality.de/display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access

I have downloaded the Karaf-Tutorial/db example. I have successfully created the DataSourceFactory and pooled and XA DataSourceFactory service. But now I am stuck at the DataSource creation step. I added the config file: org.ops4j.datasource-person.cfg in the etc folder of my jboss fuse 6.2 server (which comes with the Karaf 2.4 container) and restarted the server. But it didn't create the person DataSource.

Let me know if I am missing anything.

cschneider commented 7 years ago

Karaf 2 is not supportoed anymore.

You shold try with 4.0.8

Am 13.04.2017 18:15 schrieb "ujjwalam" notifications@github.com:

I am following the tutorial at: http://www.liquid-reality.de/ display/liquid/2012/01/13/Apache+Karaf+Tutorial+Part+6+-+Database+Access

I have downloaded the Karaf-Tutorial/db example. I have successfully created the DataSourceFactory and pooled and XA DataSourceFactory service. But now I am stuck at the DataSource creation step. I added the config file: org.ops4j.datasource-person.cfg in the etc folder of my jboss fuse 6.2 server (which comes with the Karaf 2.4 container) and restarted the server. But it didn't create the person DataSource.

Let me know if I am missing anything.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cschneider/Karaf-Tutorial/issues/30, or mute the thread https://github.com/notifications/unsubscribe-auth/AAdk6KeS3qm8BGYgV8_RbCqDeKg5LQEMks5rvkosgaJpZM4M86EJ .

ujjwalam commented 7 years ago

Thanks for the reply.

Well since our project needs to use the Fuse 6.2 server, I cannot change the Karaf container version.

I would like to ask another question, I have checked the karaf documentation and I understand that karaf container version 3 onward JPA entity manager can be container managed. I just wanted to check if this understanding is correct. Also would there be any other way by which I can have the JPA entity manager container managed in Karaf 2.4 version (I mean running the application on Fuse v 6.2 server).

cschneider commented 7 years ago

The EntityManager is always container managed if you use Aries JPA. This works since karaf 2.3. If karaf below version 4 you will need the 1.x version of Aries JPA.

cschneider commented 6 years ago

I think this is solved