Search in sources :

Example 1 with EJBHomeHandle

use of org.apache.openejb.client.EJBHomeHandle in project tomee by apache.

the class ClientObjectFactory method getHomeHandle.

@Override
public javax.ejb.HomeHandle getHomeHandle(final ProxyInfo info) {
    final CallContext call = CallContext.getCallContext();
    final BeanContext beanContext = info.getBeanContext();
    final int idCode = -1;
    Object securityIdentity = null;
    try {
        securityIdentity = call.getEJBRequest().getClientIdentity();
    } catch (Exception e) {
        e.printStackTrace();
    }
    final ClientMetaData cMetaData = new ClientMetaData(securityIdentity);
    final EJBMetaDataImpl eMetaData = buildEjbMetaData(info, beanContext, idCode);
    final EJBHomeHandler hanlder = EJBHomeHandler.createEJBHomeHandler(JNDIContext.globalExecutor(), eMetaData, getServerMetaData(), cMetaData, call.get(JNDIContext.AuthenticationInfo.class));
    return new EJBHomeHandle(hanlder.createEJBHomeProxy());
}
Also used : BeanContext(org.apache.openejb.BeanContext) EJBMetaDataImpl(org.apache.openejb.client.EJBMetaDataImpl) EJBHomeHandler(org.apache.openejb.client.EJBHomeHandler) EJBHomeHandle(org.apache.openejb.client.EJBHomeHandle) ClientMetaData(org.apache.openejb.client.ClientMetaData)

Aggregations

BeanContext (org.apache.openejb.BeanContext)1 ClientMetaData (org.apache.openejb.client.ClientMetaData)1 EJBHomeHandle (org.apache.openejb.client.EJBHomeHandle)1 EJBHomeHandler (org.apache.openejb.client.EJBHomeHandler)1 EJBMetaDataImpl (org.apache.openejb.client.EJBMetaDataImpl)1