Just to follow up on this. Standard jdbc calls solved the problem as expected.
I don't like the loss of connection pooling optimisations though. I'm planning on trying hibernate anyway - http://sourceforge.net/projects/hibernate - so this just makes it a bit more urgent.
I'd still appreciate an answer to my last question. Is it normal and good practice to use one connector from another ? In my case JDBC from my own connector.
You close() the db connection to return it to the pool,
not to destroy the connection.
I think that there is also a fault in JBoss 3.0.7 regarding opening more than one connection.
We had a situation where a session bean obtains a connection then calls a second session bean, the second session bean the obtains another connection. We were also getting the same error regarding closing the connection.
We upgraded to JBoss 3.2.1 and the problem went away.
I think I have seen a bug raised for this but I can not find it at the moment, it is possible that it could have been fixed in JBoss 3.0.8
Thanks for the replies guys. I'll definitely be migrating the connector to the latest version of JBoss when I get the chance.
Regarding the close() method. I realise that this repools a connection rather than destroying it but am still unsure why repooling a connection belonging to my connector requires the repooling of any jdbc connections it was using at the time.
If it's deliberate design rather than a bug then there are extra concerns when using one connector from another that I wasn't aware of.