/** * TODO: work in progress (refactor both invokeHomeMethod's, localHomeInvoke) */ //TODO private Object invokeHomeMethod(Method method, Object args[]) throws Exception { if (method.getName().equals(Ejb2xMethodNames.METHOD_NAME_HOME_CREATE)) { return this.invokeHomeCreate(method, args); } else if (method.getName().equals(Ejb2xMethodNames.METHOD_NAME_HOME_REMOVE)) { if (args[0] instanceof Handle) removeHandle((Handle) args[0]); else { throw new RemoveException( "EJB 3.0 Specification Violation 3.6.2.2: Session beans do not have a primary key"); } return null; } else { throw new IllegalArgumentException("illegal home method " + method); } }