AppserverIo\Appserver\PersistenceContainer\BeanManager::lookupStatefulSessionBean PHP Метод

lookupStatefulSessionBean() публичный Метод

Retrieves the requested stateful session bean.
public lookupStatefulSessionBean ( string $sessionId, string $className ) : object | null
$sessionId string The session-ID of the stateful session bean to retrieve
$className string The class name of the session bean to retrieve
Результат object | null The stateful session bean if available
    public function lookupStatefulSessionBean($sessionId, $className)
    {
        // create a unique SFSB identifier
        $identifier = SessionBeanUtil::createIdentifier($sessionId, $className);
        // load the map with the SFSBs
        $sessionBeans = $this->getStatefulSessionBeans();
        // if the SFSB exists, return it
        if ($sessionBeans->exists($identifier)) {
            return $sessionBeans->get($identifier);
        }
    }