{
// this is really an XA connection, bypass the java.lang.reflect.Proxy as it
// can't delegate to non-interfaced methods (like proprietary 'cleanup' one)
// TODO check if CGlib will manage to enhance the AMQ connection class,
// there are no final methods, but a number of private ones, though
TargetInvocationHandler targetInvocationHandler = (TargetInvocationHandler) invocationHandler;
connection = (Connection) targetInvocationHandler.getTargetObject();
Class realConnectionClass = connection.getClass();
cleanupMethod = realConnectionClass.getMethod("cleanup", (Class[])null);
}
else
{