I have registered a datasource like below:
<bean id="derbyXADataSource" class="org.apache.derby.jdbc.EmbeddedXADataSource">
<property name="databaseName" value="memory:dexiaosgipocDB" />
<property name="createDatabase" value="create" />
<service ref="derbyXADataSource" interface="javax.sql.XADataSource">
<entry key="osgi.jndi.service.name" value="jdbc/xadexiaosgipocdb" />
I want to use this datasource via JNDI lookup string as recommended in book 'Enterprise OSGi in action':
This is working in Aries 0.3 since Aries wraps the XADatasource in a normal Datasource (you also see two datasources as registered service). However Websphere CE 3.0.0 doesn't seem to do this: the datasource is only found back when I use the jndi string
osgi:service/javax.sql. XA DataSource/(osgi.jndi.service.name=jdbc/xadexiaosgipocdb)
and not via
I have seen that this version of websphere CE has version 0.2-incubating for JTA and JPA jars. Might this have something to do with it?
Pinned topic OSGi: XADatasource not wrapped?
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2011-11-15T18:50:45Z at 2011-11-15T18:50:45Z by firepit
Re: OSGi: XADatasource not wrapped?2011-11-04T15:07:45ZThis is the accepted answer. This is the accepted answer.All,
After some investigation I noticed that WAS CE 3.0.0 doesn't include the org.apache.aries.transaction.wrappers.jar. This jar is present in the Aries 0.3 distribution and is used to wrap an XADataSource in a 'normal' DataSource. Is there a reason why this is not included?
David_Jencks 270000JSJT1 Post
Re: OSGi: XADatasource not wrapped?2011-11-04T21:27:28ZThis is the accepted answer. This is the accepted answer.
- FrederikDeBacker 270004S7T1
The aries datasource/xadatasource stuff is sort of for demo purposes, it doesn't provide connection pooling or transaction recovery. In geronimo you need to deploy one of the tranql wrappers with a geronimo plan to configure your xadatasource.
I've done some work to make this easier and more osgi friendly in my geronimo sandbox but it is not integrated into geronimo trunk or was ce and may not be anytime soon.
Re: OSGi: XADatasource not wrapped?2011-11-07T07:13:46ZThis is the accepted answer. This is the accepted answer.
- David_Jencks 270000JSJT
Thanks for the reply! I have tried this also: I deployed the tranql-connector-derby-embed-xa-1.6.rar file together with the geronimo deployment plan below. This creates the database pool (I can verify this via the console). However when I try to lookup the datasource in my persistence.xml file via the jndi name 'jdbc/xadexiaosgipoc', i don't find back that name (see my previous post from 04 november).
Can you also give some assistance on this?
thanks a lot,
firepit 270004TG161 Post
Re: OSGi: XADatasource not wrapped?2011-11-15T18:50:45ZThis is the accepted answer. This is the accepted answer.
- FrederikDeBacker 270004S7T1