use of org.apache.openejb.client.EJBObjectHandle in project tomee by apache.
the class ClientObjectFactory method getHandle.
@Override
public javax.ejb.Handle getHandle(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) {
// Ignore
}
final ClientMetaData cMetaData = new ClientMetaData(securityIdentity);
final EJBMetaDataImpl eMetaData = buildEjbMetaData(info, beanContext, idCode);
final Object primKey = info.getPrimaryKey();
final EJBObjectHandler handler = EJBObjectHandler.createEJBObjectHandler(JNDIContext.globalExecutor(), eMetaData, getServerMetaData(), cMetaData, primKey, null);
return new EJBObjectHandle(handler.createEJBObjectProxy());
}
Aggregations