Gemini JPA + Gemini Naming [message #730158] |
Tue, 27 September 2011 14:07  |
Eclipse User |
|
|
|
Hi,
I already have Gemini JPA and Gemini Naming working in a virgo instance, but i cannot integrate them, because if i test putting the DB Credentials inside the persistence.xml from a persistant bundle i can query without any problem. And also if i try to get a DataSource object registered as a service throught the JNDIContextManager service i also can get the datasource.
But when i want to edit the persistent.xml and i add the following tag in the persisten-unit:
<non-jta-data-source>osgi:service/javax.sql.DataSource/(osgi.jndi.service.name=jdbc/countdb)</non-jta-data-source>
The bundle from Gemini JPA cannot register any service with the EntityManagerFactory interface for that persistent-unit.
I use the lastest versions for the two Gemini projects. I think the problem is i dont edit the persistant descriptor properly.
I attach the persistent.xml file.
thanks.
|
|
|
|
|
Re: Gemini JPA + Gemini Naming [message #730888 is a reply to message #730843] |
Thu, 29 September 2011 09:10   |
Eclipse User |
|
|
|
Quote:Ill post a enhancement request, as u said. The testing task u propose i have just done it and it works, but this workaround it is not smart. But any way i attach the code if u or anyone want to have a look.
Glad the workaround got you past this. I agree it is not an ideal way to solve the problem, I just wanted you to not be blocked by it. You have been the first person to ask for JNDI integration so it was not done, but I should be able to add in your enhancement request for the 1.1 release.
Quote:By the way. There is no documentation about the diferent Gemini Projects, so it is hard by newbies to integrate them in the projects.
Funny you should mention that, since I actually have some additional doc for the Gemini JPA project that I will be putting on the wiki today.
Quote:So we have a open prototype implementing the full stack of a web application using the Gemini projects and Vaadin framework in the frontend, except at the moment Gemini JMX, and deployed in Virgo. So we are willing to donate this application to EclipseRT, to use it as a guide or 'PetShop App'. How can we do it?
Hmm, that is a tough one. We would love to have it in the Gemini project, but the upward dependencies on Vaadin and Virgo might not make Gemini the best place to host it. However, if you can enter a bug in the Demos component of the Gemini project and attach the demo then we can take a look and see if we can use it? Thanks very much!
|
|
|
|
|
|
Re: Gemini JPA + Gemini Naming [message #1151601 is a reply to message #1142259] |
Wed, 23 October 2013 09:12  |
Eclipse User |
|
|
|
Hi David,
You seem to always post when I am away from the Gemini forum for a period of time. Sorry about that.
Are you getting a message that the datasource is not there, or that the JNDI name was not found? What naming scheme are you using to look it up? Are you using the "osgi:service/" to get a service or did some other bundle register the datasource in JNDI directly? Note that if you are looking it up as a service then some bundle needs to register a data source as a service, since JDBC driver only registers a factory.
When you played around with start levels did you ensure that all of the bundles that relate to the datasource being in JNDI or registered as a service are started before Gemini JPA. That would mean: a) the Gemini DBAccess bundles b) the Gemini Naming bundle, and c) the bundle(s) that registers the data source in JNDI or as a service
-Mike
|
|
|
Powered by
FUDForum. Page generated in 0.08322 seconds