I coded my ejb, a simple stateless session bean and deployed it to a jboss server. I then wrote client code, the guts of which is:
Integer ii = new Integer(args); int x = ii.intValue(); Properties p = new Properties(); p.load(new FileInputStream("jndi.properties")); InitialContext ic = new InitialContext(p); Object o = ic.lookup("FibonacciBean"); FibonacciHome home = (FibonacciHome) PortableRemoteObject.narrow(o, FibonacciHome.class); Fibonacci f = home.create(); double  fs = f.compute(x);
viola, it works, just as I'd expect it to.
Then, I decided to write a servlet which did the same thing as my main. It looks like: