return;
}
}
ProxyInfo proxyInfo = handler.getProxyInfo();
DeploymentInfo deployment = proxyInfo.getDeploymentInfo();
String deploymentID = deployment.getDeploymentID().toString();
switch(proxyInfo.getInterfaceType()){
case EJB_HOME: {
res.setResponseCode(ResponseCodes.JNDI_EJBHOME);
EJBMetaDataImpl metaData = new EJBMetaDataImpl(deployment.getHomeInterface(),
deployment.getRemoteInterface(),
deployment.getPrimaryKeyClass(),
deployment.getComponentType().toString(),
deploymentID,
-1, null);
res.setResult(metaData);
break;
}
case EJB_LOCAL_HOME: {
res.setResponseCode(ResponseCodes.JNDI_NAMING_EXCEPTION);
NamingException namingException = new NamingException("Not remotable: '" + name + "'. EJBLocalHome interfaces are not remotable as per the EJB specification.");
res.setResult(new ThrowableArtifact(namingException));
break;
}
case BUSINESS_REMOTE: {
res.setResponseCode(ResponseCodes.JNDI_BUSINESS_OBJECT);
EJBMetaDataImpl metaData = new EJBMetaDataImpl(null,
null,
deployment.getPrimaryKeyClass(),
deployment.getComponentType().toString(),
deploymentID,
-1, proxyInfo.getInterfaces());
metaData.setPrimaryKey(proxyInfo.getPrimaryKey());
res.setResult(metaData);
break;
}
case BUSINESS_LOCAL: {
String property = SystemInstance.get().getProperty("openejb.remotable.businessLocals", "false");
if (property.equalsIgnoreCase("true")) {
res.setResponseCode(ResponseCodes.JNDI_BUSINESS_OBJECT);
EJBMetaDataImpl metaData = new EJBMetaDataImpl(null,
null,
deployment.getPrimaryKeyClass(),
deployment.getComponentType().toString(),
deploymentID,
-1, proxyInfo.getInterfaces());
metaData.setPrimaryKey(proxyInfo.getPrimaryKey());
res.setResult(metaData);
} else {