// Create bean method mappings for container invoker
final EJBViewDescription remoteView = componentDescription.getEjbRemoteView();
final ClassIndex remoteClass;
try {
remoteClass = classIndex.classIndex(remoteView.getViewClassName());
} catch (ClassNotFoundException e) {
throw new RuntimeException("Could not load remote interface for " + componentDescription.getEJBClassName(), e);
}
final EJBViewDescription homeView = componentDescription.getEjbHomeView();
final ClassIndex homeClass;
try {
homeClass = classIndex.classIndex(homeView.getViewClassName());
} catch (ClassNotFoundException e) {
throw new RuntimeException("Could not load home interface for " + componentDescription.getEJBClassName(), e);
}
componentDescription.getEjbHomeView().getConfigurators().add(new IIOPInterceptorViewConfigurator());
componentDescription.getEjbRemoteView().getConfigurators().add(new IIOPInterceptorViewConfigurator());
final InterfaceAnalysis remoteInterfaceAnalysis;
try {
//TODO: change all this to use the deployment reflection index
remoteInterfaceAnalysis = InterfaceAnalysis.getInterfaceAnalysis(remoteClass.getModuleClass());
} catch (RMIIIOPViolationException e) {
throw new RuntimeException("Could not analyze remote interface for " + componentDescription.getEJBClassName(), e);
}
final Map<String, SkeletonStrategy> beanMethodMap = new HashMap<String, SkeletonStrategy>();
final AttributeAnalysis[] remoteAttrs = remoteInterfaceAnalysis.getAttributes();
for (int i = 0; i < remoteAttrs.length; i++) {
final OperationAnalysis op = remoteAttrs[i].getAccessorAnalysis();
logger.debug(" " + op.getJavaName() + "\n " + op.getIDLName());
//translate to the deployment reflection index method
//TODO: this needs to be fixed so it just returns the correct method
final Method method = translateMethod(deploymentReflectionIndex, op);
beanMethodMap.put(op.getIDLName(), new SkeletonStrategy(method));
final OperationAnalysis setop = remoteAttrs[i].getMutatorAnalysis();
if (setop != null) {
logger.debug(" " + setop.getJavaName() + "\n " + setop.getIDLName());
//translate to the deployment reflection index method
//TODO: this needs to be fixed so it just returns the correct method
final Method realSetmethod = translateMethod(deploymentReflectionIndex, setop);
beanMethodMap.put(setop.getIDLName(), new SkeletonStrategy(realSetmethod));
}
}
final OperationAnalysis[] ops = remoteInterfaceAnalysis.getOperations();
for (int i = 0; i < ops.length; i++) {
logger.debug(" " + ops[i].getJavaName() + "\n " + ops[i].getIDLName());
beanMethodMap.put(ops[i].getIDLName(), new SkeletonStrategy(translateMethod(deploymentReflectionIndex, ops[i])));
}
// Initialize repository ids of remote interface
final String[] beanRepositoryIds = remoteInterfaceAnalysis.getAllTypeIds();
// Create home method mappings for container invoker
final InterfaceAnalysis homeInterfaceAnalysis;
try {
//TODO: change all this to use the deployment reflection index
homeInterfaceAnalysis = InterfaceAnalysis.getInterfaceAnalysis(homeClass.getModuleClass());
} catch (RMIIIOPViolationException e) {
throw new RuntimeException("Could not analyze remote interface for " + componentDescription.getEJBClassName(), e);
}
final Map<String, SkeletonStrategy> homeMethodMap = new HashMap<String, SkeletonStrategy>();