java - Why am I getting "is not a NamedXAResource" in Apache Karaf 4.0.4? -


i have transactional code worked in old versions of apache karaf. in apache karaf 4.0.4 see lot of exceptions.

java.lang.illegalstateexception: cannot log transactions org.apache.derby.jdbc.embedxaresource@77cbf3e5 not namedxaresource.

and

org.apache.aries.transaction.manager - 1.3.0 | please correct integration , supply namedxa java.lang.illegalstateexception: cannot log transactions transactioncontext{transactionid=null,connection=activemqconnection

share|improve question
up vote 8 down vote accepted

i found answer , post here give others quicker way solve same problem. took me quite while , guillaume figure out.

the geronimo transaction manager used in apache karaf inside aries transaction manager bundle can recover transactions. default feature switched off in older karaf versions. in apache karaf 4.0.4 has changed.

the config etc/org.apache.aries.transaction.cfg contains setting

aries.transaction.recoverable = true 

it activates recovery support. downside of jdbc , jms connections must implement namedxaresource. outside standard jdbc , jms providers not support this.

the solution activemq use jcapoolingconnectionfactory. jdbc can wrap xadatasource using aries transaction jdbc. provides pooling support supports recovery.

if happy how application worked before can set above switch false. transactions work in older apache karaf versions.

share|improve answer

your answer

 
discard

posting answer, agree privacy policy , terms of service.

not answer you're looking for? browse other questions tagged or ask own question.

Comments