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?
NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
This topic has been locked.
5 replies Latest Post - 2011-11-15T18:50:45Z by firepit
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:45Z in response to FrederikDeBackerAll,
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 PostACCEPTED ANSWER
Re: OSGi: XADatasource not wrapped?2011-11-04T21:27:28Z in response to FrederikDeBackerHi,
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:46Z in response to David_JencksHi David,
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,