code: public Object allocateConnection(ManagedConnectionFactory mcf, ConnectionRequestInfo cri) throws ResourceException
     {
        if (shutdown.get())
           throw new ResourceException();
        Credential credential;
        if (subjectFactory == null || cmConfiguration.getSecurityDomain() == null)
        {
           credential = new Credential(null, cri);
        }
        else
        {
           credential = new Credential(SecurityActions.createSubject(subjectFactory,
                                                                     cmConfiguration.getSecurityDomain(),
                                                                     mcf),
                                       cri);
        }
        org.ironjacamar.core.connectionmanager.listener.ConnectionListener cl = getConnectionListener(credential);
        Object connection = cl.getConnection();
  
        if (ccm != null)
           ccm.registerConnection(this, cl, connection);
  
        return connection;
     }
docs: {@inheritDoc}