2 Replies Latest reply on May 27, 2004 1:15 PM by jmaclatchie

    Resource Adapter warning message

    jmaclatchie

      I've modified a simple resource adapter from an IBM tutorial on how to develop JCA components. It now deploys ok in my JBoss 3.2.3 environment and returns the correct results, however I see on the log the following INFO message:

      17:26:01,300 INFO [NoTxConnectionManager] Unregistered handle that was not registered! javax.resource.spi.ConnectionEvent[source=com.ibm.ssya.helloworldra.HelloWorldManagedConnectionImpl@164bff9] for managedConnection: com.ibm.ssya.hellowo
      rldra.HelloWorldManagedConnectionImpl@164bff9

      As I would like to use this code as the basis for a production level RA could someone point me to the reference on how to "register" my adapter so that it no longer receives the unregistered message? Thanks,

      jmaclatchie

        • 1. Re: Resource Adapter warning message

          Why are you passing the connection event object as the handle
          rather than the closed connection object you originally returned from
          ManagedConnection.getConnection(...)?

          • 2. Re: Resource Adapter warning message
            jmaclatchie

            I suppose the immediate answer is because I'm still learning and did not fully understand the code in the tutorial that I used. After rereading your response/question and reviewing my code it seems that the [INFO] message then is comming from the connection.close() call. I have the following code in my ManagedConnection implementation:

            public void close()
            {
            Enumeration list = listeners.elements();
            ConnectionEvent event = new ConnectionEvent(this, ConnectionEvent.CONNECTION_CLOSED);
            event.setConnectionHandle(event);
            while (list.hasMoreElements())
            {
            ((ConnectionEventListener) list.nextElement()).connectionClosed(event);
            }
            connection.invalidate();
            }

            Upon review of the sample code in Chapter 7 of the JBoss Admin & Devel manual I see that a key difference is the
            event.setConnectionHandle(event);
            instruction that is in my close() method. Is it safe to say then that this is the cause of the unregistered handle info message I'm producing and if I pass in the "connection" object rather that the "event" object on the setConnectionHandle() method the message will be eliminated?
            Thanks,
            jmaclatchie