-
1. Re: Connection handle is not currently associated with a Man
davidjencks Aug 20, 2002 12:54 PM (in response to y_bhakta)Can you provide more details of how you are obtaining and using the connection handle, showing where it is obtained and where it is closed.
Does your adapter implement associateConnection properly?
What is the relationship between the cci adapter stuff you have implemented and the jboss local jdbc wrapper that it appears to be using? -
2. Re: Connection handle is not currently associated with a Man
y_bhakta Aug 21, 2002 8:16 PM (in response to y_bhakta)Below is the code of CciManagedConnection.associateConnection()
public void associateConnection(Object connection) throws ResourceException
{
if (connection instanceof CciConnection)
{
CciConnection cciCon = (CciConnection) connection;
cciCon.associateConnection(this);
}
else
{
throw new IllegalStateException("Invalid connection object: " + connection);
}
}
Below is the code of CciConnection.associateConnection()
public void associateConnection(CciManagedConnection newMc) throws ResourceException
{
// dissociate handle with current managed connection
mc.removeCciConnection(this);
// associate handle with new managed connection
newMc.addCciConnection(this);
mc = newMc;
}
removeConnection() puts connection in Set and removeConnection() removes the connection from Set.
I am creating the DataSource and associating the DataSource to Adapter and ManagedConnectionFactory returns the Connection from DataSource.
Thanks
Bhakta -
3. Re: Connection handle is not currently associated with a Man
y_bhakta Aug 21, 2002 8:18 PM (in response to y_bhakta)Below is the code of CciManagedConnection.associateConnection()
public void associateConnection(Object connection) throws ResourceException
{
if (connection instanceof CciConnection)
{
CciConnection cciCon = (CciConnection) connection;
cciCon.associateConnection(this);
}
else
{
throw new IllegalStateException("Invalid connection object: " + connection);
}
}
Below is the code of CciConnection.associateConnection()
public void associateConnection(CciManagedConnection newMc) throws ResourceException
{
// dissociate handle with current managed connection
mc.removeCciConnection(this);
// associate handle with new managed connection
newMc.addCciConnection(this);
mc = newMc;
}
removeConnection() puts connection in Set and removeConnection() removes the connection from Set.
I am creating the DataSource and associating the DataSource to Adapter and ManagedConnectionFactory returns the Connection from DataSource.
Thanks
Bhakta -
4. Re: Connection handle is not currently associated with a Man
davidjencks Aug 25, 2002 1:28 AM (in response to y_bhakta)I have no idea what this means:
I am creating the DataSource and associating the DataSource to Adapter and ManagedConnectionFactory returns the Connection from DataSource.
You answered one out of 3 of my questions. What you show looks ok. Is associateConnection ever called?