A comment on my first installment on this blog was asking for a sample for loading particular EJB modules.
Well, there is no "rocket science" behind this, but the usual client lookup of the Enterprise Java Beans or any other J2EE services you need.
In it's simplest incarnation it might look like this code snippet:
public static void main(String[] args) {
// ...
InitialContext ctx = new InitialContext();
Object obj = ctx.lookup("MyEJB");
MyEJBHome home = (MyEJBHome)PortableRemoteObject.narrow(obj, MyEJBHome.class);
MyEJB bean = home.create();
// ...
}
For Servlets a simple URL, URLConnection combination works in the same fashion.
However, I prefer to use the same utilities like ServiceLocator et al in the application client as I use them in the J2EE application.