[jboss-user] [JCA/JBoss] - Re: Destroying connection that could not be successfully mat

daphna do-not-reply at jboss.com
Mon Jan 7 08:02:42 EST 2008


Hi Vick,
Thanks for your reply.
It seems that InternalManagedConnectionPool.getConnection() always retrieves the last member of available connections, without trying to find the corret one:

cl = (ConnectionListener) cls.remove(cls.size() - 1);

Does this inplementation expects to find only one member in the list?

Our code for GWManagedConnectionFactory.matchManagedConnections()  is as following:
public ManagedConnection matchManagedConnections(Set connectionSet, Subject subject, ConnectionRequestInfo info)
        throws ResourceException {
    	
        // The contents of connectionSet cannot change during this call, so no need to synchonize the Iterator
        Iterator iter = connectionSet.iterator();
        boolean found = false;
        GWManagedConnection retConnection = null;
        while (iter.hasNext() && !found) {
            GWManagedConnection mc = (GWManagedConnection) iter.next();
            if ((mc != null) && mc.getGWConnectionRequestInfo().equals(info)) {
                found = true;
                retConnection = mc;
            }
        }
        return retConnection;
    }

GWManagedConnection implements ManagedConnection

I will email you the server.log with trace enabled.
Thanks
Daphna

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117550#4117550

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117550



More information about the jboss-user mailing list