So I was playing with reimplementing the (CCM) cached connection manager yesterday.
Although I managed to solve the problem mentioned here http://jira.jboss.com/jira/browse/JBJCA-12 and some of the other problems I know about. The solution I have does little to resolve the underlying problem of this features The CCM is responsible for the following features. 1) Keeping track of Unshareable connections as defined on resource-refs. With the current implementation this only works if you set the misnamed SpecCompliant to true (but then you lose the connection close checking) 2) Lazy enlistment of connections into user transactions, e.g. | Connection c = connectionFactory.createConnection; | UserTransaction ut = ... | ut.begin(); // does ut.enlistResource(c); | ... | ut.commit(); | ... | ut.begin(); // does ut.enlistResource(c) again | 3) Connection close checking - keeping track of which beans opened which connections and closing them with warnings. 4) SpecCompliant=true processing (which doesn't look very spec compliant to me :-) This is similar to the connection close checking except instead of closing the connection it disconnects the connection from the managed connection (which is returned to the pool). When the ejb is reinvoked, it automatically reconnects i.e. gets a ManagedConnection for the connection handle. The major problem with this processing is that there is no notification that the bean has vanished/bean garbage collects so nothing tidies up the map of object -> connection handles in the CCM. The original JIRA problem mentioned above is that if somebody does a getConnection() or connection.close() during transaction synchronization, the context is incorrect. It is the context of the caller since we are outside the CCM interceptor. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3861198#3861198 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3861198 ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ JBoss-Development mailing list JBoss-Development@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-development