use of org.apache.openejb.client.ClientMetaData in project tomee by apache.
the class ClientObjectFactory method getBusinessObject.
@Override
public Object getBusinessObject(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 = new EJBMetaDataImpl(null, null, beanContext.getPrimaryKeyClass(), beanContext.getComponentType().toString(), beanContext.getDeploymentID().toString(), idCode, convert(info.getInterfaceType()), info.getInterfaces(), beanContext.getAsynchronousMethodSignatures());
eMetaData.loadProperties(beanContext.getProperties());
final Object primKey = info.getPrimaryKey();
final EJBObjectHandler hanlder = EJBObjectHandler.createEJBObjectHandler(JNDIContext.globalExecutor(), eMetaData, getServerMetaData(), cMetaData, primKey, null);
return hanlder.createEJBObjectProxy();
}
Aggregations