1 Reply Latest reply on Nov 4, 2003 5:21 PM by Adrian Brock

    Timer MBean and Stateful Session Bean

    gue13 Newbie

      am trying to use the Timer MBean with a stateful session bean and need help...

      my sfsb has 3 business methods, which are to be called in a defined order (b1 => b2 => b3)

      after b1 and b2 a timeout of 11 seconds is required (which i tried using Timer MBean as described)
      (b2 does a "select for update" in database, locking one or more records, b3 releases the record, either doing a commit or rollback)

      Timer-Listener in my SFSB:

      public class Listener_New implements NotificationListener {
      public void handleNotification(Notification pNotification, Object pHandback) {...}

      my sfsb is working fine, my CON (Database Conneciton) exists over all 3 business methods. the only (and BIG) problem is, if the Timer-Listener receives an event (which i registered),
      the CON is still there (NOT closed) but i got the error:

      java.sql.SQLException: Connection handle is not currently associated with a ManagedConnection
      2003-11-02 21:35:56,682 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedConnection.checkStatus(WrappedConnection.java:804)
      2003-11-02 21:35:56,692 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedConnection.setAutoCommit(WrappedConnection.java:455)

      Maybe its because the Listener is not a business-method and the transaction-context or session-context is lost??? any idea?? please help!!!