You could look at the code to see why or try
Connection uc = ((JDBCConnection)con).getUnderlyingConnection()
and use that. I'm not sure of the exact class name of the wrapper connection. Be sure to close con, not uc, when you are done.
Do you mean that the XADataSourceImpl.getConnection() - returned object is extended from JDBCConnection class? I could not do the above mentioned typecast as it is not compiling. Is this some 3d party class that needs to be used here?... pls.. help me out..