//look up jndi name
Object ref = context.lookup("ParticipantRemote");
//look up jndi name and cast to Home interface
participantRemoteHome = (ParticipantRemoteHome) PortableRemoteObject.narrow(ref, ParticipantRemoteHome.class);
if (logging) {
long endTime = System.currentTimeMillis();
log("Succeeded initializing bean access through Home interface.");
log("Execution time: " + (endTime - startTime) + " ms.");
}
}
return new InitialContext(properties);
}
catch(Exception e) {
log("Unable to connect to WebLogic server at " + url);
log("Please make sure that the server is running.");
throw e;
}
}
一些set get方法之类
public static void main(String[] args) {
ParticipantTestClient1 client = new ParticipantTestClient1();
}
3.在其它文件中这么调用
ParticipantTestClient1 client = new ParticipantTestClient1();