Search in sources :

Example 1 with EjbService

use of org.glassfish.enterprise.iiop.spi.EjbService in project Payara by payara.

the class POAProtocolMgr method getEjbDescriptor.

/**
 * Called from SecurityMechanismSelector for each objref creation
 */
@Override
public EjbDescriptor getEjbDescriptor(byte[] ejbKey) {
    EjbDescriptor result = null;
    try {
        if (_logger.isLoggable(Level.FINE)) {
            _logger.log(Level.FINE, "POAProtocolMgr.getEjbDescriptor->: {0}", ejbKey);
        }
        if (ejbKey.length < POARemoteReferenceFactory.EJBID_OFFSET + 8) {
            if (_logger.isLoggable(Level.FINE)) {
                _logger.log(Level.FINE, "POAProtocolMgr.getEjbDescriptor: {0}: {1} < {2}{3}", new Object[] { ejbKey, ejbKey.length, POARemoteReferenceFactory.EJBID_OFFSET, 8 });
            }
            return null;
        }
        long ejbId = Utility.bytesToLong(ejbKey, POARemoteReferenceFactory.EJBID_OFFSET);
        if (_logger.isLoggable(Level.FINE)) {
            _logger.log(Level.FINE, "POAProtocolMgr.getEjbDescriptor: {0}: ejbId: {1}", new Object[] { ejbKey, ejbId });
        }
        EjbService ejbService = ejbServiceProvider.get();
        result = ejbService.ejbIdToDescriptor(ejbId);
    } finally {
        if (_logger.isLoggable(Level.FINE)) {
            _logger.log(Level.FINE, "POAProtocolMgr.getEjbDescriptor<-: {0}: {1}", new Object[] { ejbKey, result });
        }
    }
    return result;
}
Also used : EjbService(org.glassfish.enterprise.iiop.spi.EjbService) EjbDescriptor(com.sun.enterprise.deployment.EjbDescriptor)

Aggregations

EjbDescriptor (com.sun.enterprise.deployment.EjbDescriptor)1 EjbService (org.glassfish.enterprise.iiop.spi.EjbService)1