Hi,
Sorry for the doubled mail (some issues with my client).

As long as you don't use the transaction manager (i.e use a single resource
in a transaction), I think that it's ok (from what I understand, but I may
be wrong).

However,  auto enlistement is quite easy to achieve:
You just have to include
org.apache.aries.transaction/org.apache.aries.transaction.jdbc
dependency, then export your XADatasource service adding some properties:
<service ref="dataSource" interface="javax.sql.XADataSource">
<service-properties>
<entry key="osgi.jndi.service.name"
value="jdbc/${project.parent.artifactId}.database.xa" />
<entry key="aries.xa.username" value="APP"/>
<entry key="aries.xa.password" value="APP"/>
<entry key="aries.xa.transaction" value="xa"/>
<entry key="aries.xa.name"
value="${project.parent.artifactId}.database.xa"/>
</service-properties>
</service>

It's pretty nothing to do and that ensures that your app could handle
multiple resources in the future (and many lost hours searching for the
cause).

Regards

2014-11-27 13:06 GMT+01:00 garethahealy <[email protected]>:

> So from what you've said, if i am not mixing transactions across
> components,
> then i wouldn't need to use the aries auto enlisted feature.
>
> i.e.: my setup is purely DB transactions, so its not needed.
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/XA-Database-and-aries-xa-aware-tp4036692p4036725.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 
Charlie Mordant

Full OSGI/EE stack made with Karaf:
https://github.com/OsgiliathEnterprise/net.osgiliath.parent

Reply via email to