Search in sources :

Example 1 with EJBHomeHandler

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

the class ClientObjectFactory method getEJBHome.

@Override
public javax.ejb.EJBHome getEJBHome(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, null);
    return hanlder.createEJBHomeProxy();
}
Also used : BeanContext(org.apache.openejb.BeanContext) EJBMetaDataImpl(org.apache.openejb.client.EJBMetaDataImpl) EJBHomeHandler(org.apache.openejb.client.EJBHomeHandler) ClientMetaData(org.apache.openejb.client.ClientMetaData)

Example 2 with EJBHomeHandler

use of org.apache.openejb.client.EJBHomeHandler 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)2 ClientMetaData (org.apache.openejb.client.ClientMetaData)2 EJBHomeHandler (org.apache.openejb.client.EJBHomeHandler)2 EJBMetaDataImpl (org.apache.openejb.client.EJBMetaDataImpl)2 EJBHomeHandle (org.apache.openejb.client.EJBHomeHandle)1