public class EjbSelect {
public static Object execute(Object di, String methodSignature, String returnType, Object... args) throws FinderException {
DeploymentInfo deploymentInfo = (DeploymentInfo) di;
Container container = deploymentInfo.getContainer();
if (!(container instanceof CmpContainer)) {
throw new FinderException("Deployment is not connected to a CmpContainer " + deploymentInfo.getDeploymentID());
}
CmpContainer cmpContainer = (CmpContainer) container;
Object result = cmpContainer.select(deploymentInfo, methodSignature, returnType, args);
if (result instanceof Number) {
Number number = (Number) result;