Context Init=new InitialContext();
Enterprise1 enterprise1Home Home=Init.lookup("java:comp/env/ejb/Enterprise1");
Enterprise1 obj = enterprise1Home.create();
Enterprise1 enterprise1Home Home=Init.lookup("java:comp/env/ejb/Enterprise1");
Enterprise1 obj = enterprise1Home.create();
Enterprise1Home enterprise1Home =Init.lookup("java:comp/env/ejb/Enterprise1");
to macoff(天堂)用OBJECT是先得到本地接口的引用然后用PortableRemoteObject.narrow方法将其强行转变为本地接口!!
properties.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
properties.put(Context.PROVIDER_URL, "t3://127.0.0.1:7001");
Context Init=new InitialContext(properties);