return;
}
}
}
ProxyInfo proxyInfo = handler.getProxyInfo();
DeploymentInfo deployment = proxyInfo.getDeploymentInfo();
String deploymentID = deployment.getDeploymentID().toString();
updateServer(req, res, proxyInfo);
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, convert(proxyInfo.getInterfaceType()), null);
metaData.loadProperties(deployment.getProperties());
log(metaData);
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, convert(proxyInfo.getInterfaceType()), proxyInfo.getInterfaces());
metaData.setPrimaryKey(proxyInfo.getPrimaryKey());
metaData.loadProperties(deployment.getProperties());
log(metaData);
res.setResult(metaData);
break;