0 Replies Latest reply on Aug 21, 2007 5:58 AM by Bruce Springfield

    How to fix NameAlreadyBoundException due to GenericTransacti

    Bruce Springfield Apprentice

      I ran into this error and found the problem listed under JBossCacheTroubleshooting :

      Q. I'm using org.jboss.cache.GenericTransactionManagerLookup as the TransactionManagerLookupClass and jboss:service=TransactionManager service fails to start due to a javax.naming.NameAlreadyBoundException being thrown, what is happening?
      Setting org.jboss.cache.GenericTransactionManagerLookup? as the TransactionManagerLookupClass? allows JBoss Cache to look for the transaction manager in a application server independent way by looking for the common transaction manager definitions in JBoss, BEA, Wepshere,...etc. However, if you don't set the dependency on a specific transaction manager service, it can lead to this exception.
      If JBoss Cache starts before the transaction manager does, the transaction manager lookup will fail falling back on the DummyTransactionManager?, and binding it in the JNDI. When the actual TransactionManager starts, it will fail binding it because the DummyTransactionManager? occupies it.

      But its not very clear how to fix the problem other than using the JBossTransactionLookup instead.

      Any suggestions?

      Another note is all the sample cache configs provided under the /etc/META-INF folder in the JBossCache-all-2.0.0.CR3 distribution all use this form of TransactionManager entry that causes the error.