1 Reply Latest reply on Feb 18, 2005 7:43 PM by adrian.brock

    Trying to return an unknown connection2 / Interceptors

    eugene75

      Adrian --

      In reference to this post http://www.jboss.org/index.html?module=bb&op=viewtopic&t=59294, I have a few questions.

      1) The workaround stated for this problem is to remove the CachedConnectionManager from the container. What is the downside to this workaround?

      2) Is the appearance of the "Trying to return an unknown connection2" something that can be safely ignored. Or is it an indication of a problem that can have nasty side-effects? It does not seem to negatively impact our application.

      3) What is the correct way to design interceptors that require database resources in a way that plays nicely with the CachedConnectionManager? Our application employs a security extension implemented via JBoss security extension framework. It looks up user permissions in a database and must do so in the current transaction context. In order to improve performance, the database connection and statement are being cached for the duration of the transaction.

      Thanks for you help.

        • 1. Re: Trying to return an unknown connection2 / Interceptors

          I've given up trying to explain this.

          If you don't follow the spec semantics, the CCM won't understand what you
          are doing.

          If you "cache" things outside an EJB instance you can expect the CCM to complain.

          Solution:
          Understand the spec semantics and don't try to work around them
          i.e. play nicely with the connection manager and pooling
          OR remove the CachedConnectionInterceptor