mc.setConnectionSharing(true);
    public Object allocateConnection(ManagedConnectionFactory mcf,            ConnectionRequestInfo cxRequestInfo) throws ResourceException {        FBManagedConnection mc = (FBManagedConnection)((FBManagedConnectionFactory)mcf).createManagedConnection(null, cxRequestInfo);        mc.setManagedEnvironment(true);        mc.addConnectionEventListener(this);        return mc.getConnection(null, cxRequestInfo);    }