Posts

Showing posts from January, 2009

Accessing ejb3 session beans from remote java application

LMAppletserver is a great tool for communicating from java-applet to server, but it is also a great tool for remote calls over http to ejb3 session beans in general.

Here's an example of using stateful session beans with lmappletserver:

https://lmappletserver.svn.sourceforge.net/svnroot/lmappletserver/lmappletserver_core/src_tests/com/lightminds/appletserver/core/tests/SFSBTest.java

This is a unit test class, which also contains result verification, but is also a good example of how to use stateful session beans. You can check out the entire project in netbeans from:

https://lmappletserver.svn.sourceforge.net/svnroot/lmappletserver/lmappletserver_core

In NetBeans 6.5, just right click on the project, and select "Test" to run the tests (including the Stateful session bean test).

The test uses Apache OpenEJB and Jetty as http servlet container (running the rpc servlet).