David Jencks wrote:

On Jan 3, 2007, at 10:56 AM, Mike Perham wrote:

I'm using the new 1.2-beta with the mysql-xa connector from wasce
1.1.0.1.  My application does some db work when it starts up and we
don't see this error on 1.1.0.1.  I'm using Spring 1.2.8's
JTATransactionManager like this:

<bean id="inboxTransactionManager"
class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManagerName"><value>java:/TransactionManager</value></property>
</bean>

Is this the correct JNDI location?

I would have expected it to be java:TransactionManager but it's possible both values work. I suspect it's working because apparently there is a transaction started and I assume it was started by Spring.

I haven't personally tried the tranql mysql xa adapter (is that the one from wasce?)

No, WASCE doesn't include the MySQL adapter from TranQL.
BTW - WASCE 1.1.0.1 == Geronimo 1.1.1

but I wonder.... have you gotten it to work in other
circumstances?

One possibility is that there's a bug in the connector. When a connection is not enrolled in a transaction it's supposed have autocommit behavior. If this isn't working you probably wouldn't see a problem using a local-tx connector since there isn't much to the start of a transaction -- just turning off autocommit. If it was already off you might not see any errors.

Can you put a breakpoint in a likely spot in perhaps the WrapperNamedXAResource and see if commit is actually being called?

Do you expect there to be any work done outside a transaction?

thanks
david jencks


09:50:32,771 WARN [Transaction] Unable to enlist XAResource org.apache.geronimo
[EMAIL PROTECTED], errorCode: -9
com.mysql.jdbc.jdbc2.optional.MysqlXAException: XAER_OUTSIDE: Some work is done
outside global transaction
at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.mapXAExceptionFromSQL
Exception(MysqlXAConnection.java:562)
at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(Mysql
XAConnection.java:545)
at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.start(MysqlXAConnecti
on.java:485)
at org.apache.geronimo.transaction.manager.WrapperNamedXAResource.start(
WrapperNamedXAResource.java:86)
at org.apache.geronimo.transaction.manager.TransactionImpl.enlistResourc
e(TransactionImpl.java:207)
at org.apache.geronimo.connector.outbound.TransactionEnlistingIntercepto
r.getConnection(TransactionEnlistingInterceptor.java:54)
at org.apache.geronimo.connector.outbound.TransactionCachingInterceptor.
getConnection(TransactionCachingInterceptor.java:87)
at org.apache.geronimo.connector.outbound.ConnectionHandleInterceptor.ge
tConnection(ConnectionHandleInterceptor.java:43)
at org.apache.geronimo.connector.outbound.TCCLInterceptor.getConnection(
TCCLInterceptor.java:39)
at org.apache.geronimo.connector.outbound.ConnectionTrackingInterceptor.
getConnection(ConnectionTrackingInterceptor.java:66)
at org.apache.geronimo.connector.outbound.AbstractConnectionManager.allo
cateConnection(AbstractConnectionManager.java:61)
at org.tranql.connector.jdbc.DataSource.getConnection(DataSource.java:56
)
at $javax.sql.DataSource$$FastClassByCGLIB$$6525cafd.invoke(<generated>)

       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.apache.geronimo.connector.ConnectorMethodInterceptor.intercept(Co
nnectorMethodInterceptor.java:54)
at $javax.sql.DataSource$$EnhancerByCGLIB$$f0297be4.getConnection(<gener
ated>)
at org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(D
ataSourceUtils.java:112)
at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy.g
etConnection(TransactionAwareDataSourceProxy.java:107)
at org.springframework.orm.ojb.support.LocalDataSourceConnectionFactory.
lookupConnection(LocalDataSourceConnectionFactory.java:88)
at org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.getConnection
(Unknown Source)
at org.apache.ojb.broker.accesslayer.StatementManager.getPreparedStateme
nt(Unknown Source)
at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeQuery(Unknown
Source)
at org.apache.ojb.broker.accesslayer.RsQueryObject.performQuery(Unknown
Source)
at org.apache.ojb.broker.accesslayer.RsIterator.<init>(Unknown Source) at org.apache.ojb.broker.core.RsIteratorFactoryImpl.createRsIterator(Unk
nown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getRsIteratorFromQue
ry(Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getIteratorFromQuery
(Unknown Source)
at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(
Unknown Source)
at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(
Unknown Source)
at org.apache.ojb.broker.core.QueryReferenceBroker.getCollectionByQuery(
Unknown Source)
at org.apache.ojb.broker.core.PersistenceBrokerImpl.getCollectionByQuery
(Unknown Source)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionB
yQuery(Unknown Source)
at org.apache.ojb.broker.core.DelegatingPersistenceBroker.getCollectionB
yQuery(Unknown Source)
at org.springframework.orm.ojb.PersistenceBrokerTemplate$3.doInPersisten
ceBroker(PersistenceBrokerTemplate.java:192)
at org.springframework.orm.ojb.PersistenceBrokerTemplate.execute(Persist




Mike, for WASCE specific questions, try using our devWorks forum at -
http://www-128.ibm.com/developerworks/forums/dw_forum.jsp?forum=541&cat=51


-Donald

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to