// invokes EJB method
public Object invoke(String methodName, Object[] args) {
Object response = null;
try {
if (ejbStub instanceof ObjectImpl) {
ObjectImpl objectImpl = (ObjectImpl)ejbStub;
// TODO: If the Java 2 security is turned on, then
// the ORB will try to create proxy
// from the interfaces defined on the stub
if (System.getSecurityManager() == null && objectImpl._is_local()) {
/*
* CORBA.Stub is what the object from JNDI will be for a
* remote EJB in the same JVM as the client, but with no
* stub classes available on the client
*/