We configure our Spring transaction in Spring config as:
<tx:jta-transaction-manager/>
I gather this means that Spring will automatically discover the underlying JTA implementation. So when we start up JBoss we see these messages while Spring searches:
[JtaTransactionManager] [ ] No JTA TransactionManager found at fallback JNDI location [java:comp/Tran
sactionManager]
javax.naming.NameNotFoundException: TransactionManager not bound
<<Big stack trace>>
<<More of the same>>
And then eventually see:
[JtaTransactionManager] [ ] JTA TransactionManager found at fallback JNDI location [java:/Transaction
Manager]
[JtaTransactionManager] [ ] Using JTA UserTransaction: org.jboss.tm.usertx.client.ServerVMClientUserT
ransaction@1f78dde
Question is - how can we edit our <tx:jta-transaction-manager/>
tag to explicitly configure the java:/Transaction Manager
JTA implementation so we avoid all these stack traces in the logs? (I'd prefer not to just change the Log4J logging levels)
Update: I replaced <tx:jta-transaction-manager/>
with the below config and it seems to work.. i'm guessing this is alright?
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManagerName" value="java:/TransactionManager"/>
</bean>