0 Replies Latest reply on Nov 9, 2002 9:18 PM by mirza_mohsin_beg

    "xaRes not enlisted" Error

    mirza_mohsin_beg

      Hi,

      For the sake of execution speed I am trying to hold a prepared statement in a stateless session bean,
      so that this bean's remote methods are just executed by just binding variables in the prepared statement.

      Bean (trans-attribute=NotSupported)
      ejbCreate(get db connection and prepare statement)
      ejbRemote(close prepared statement and db connection)
      processMethod2(execute prepared statement with valuex)
      processMethod1(execute prepared statement with valuey)

      Now if I call BeanA.processMethodxx() from any other bean (that is running in a transaction)
      I get the error below. I would appreciate any help on this.

      java.lang.IllegalArgumentException: xaRes not enlisted
      at org.jboss.tm.TxCapsule.delistResource(TxCapsule.java:552)
      at org.jboss.tm.TransactionImpl.delistResource(TransactionImpl.java:92)
      at org.jboss.resource.connectionmanager.LocalTxConnectionManager$LocalConnectionEventListener.delist(LocalTxConnectionManager.java:347)
      at org.jboss.resource.connectionmanager.LocalTxConnectionManager.managedConnectionDisconnected(LocalTxConnectionManager.java:272)
      at org.jboss.resource.connectionmanager.BaseConnectionManager2.disconnect(BaseConnectionManager2.java:627)
      ......