Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

Jetty and ObjectWeb EasyBeans (aka JOnAS EJB3 Container)

EasyBeans is an open-source Enterprise Java Beans (EJB) container hosted by the OW2 consortium. The License used by EasyBeans is the LGPL.
EasyBeans is a lightweight container that can be embedded in several Java EE servers or Web server like Jetty.

There are different packages on the EasyBeans download page. The Jetty package has to be downloaded. It is provided both in .zip or .tgz format


  • A JRE v5.0 (or higher) is required
  • Jetty 6.1 or higher version is needed (the previous versions don't have a feature required by EasyBeans)
  • Ant tool (1.6 or higher)

Adding EasyBeans in Jetty

This step is quite easy. EasyBeans packaging provides a .war file. This .war file has to be copied in JETTY_HOME/webapps/ folder.

EJB3 Example

Using an existing example

The examples provided in the EasyBeans release need to be copied in the $JETTY_HOME/examples_ejb3s/ directory. The resulting directory will be $JETTY_HOME/examples_ejb3s with subfolders like statelessbean

Stateless example

Trying the example

The preview is bundled with some examples. The first one is a stateless bean

Here are the steps for launching this example:

  1. Check that JETTY_HOME environment variable is defined before launching ant scripts
    ant needs to be launched in $JETTY_HOME/examples_ejb3s/statelessbean directory. This will compile the source code and copy the archive into the $JETTY_HOME/ejb3s/stateless.jar/ directory.
  2. On the server side, some traces will be printed. This is because the EJB3 container has detected a new module in the $JETTY_HOME/ejb3s directory. The bean was loaded automatically.
    Creating container for archive /home/xxx/xxx/stateless.jar.
  3. Then, the client can be executed by running the command ant run.client
    If the client is executed without errors, the output will be:
    No Format
               [java] Calling helloWorld method...
               [java] Add 1 + 2...
               [java] Sum = '3'.
  4. There is also a servlet's client that has been put in $JETTY_HOME/webapps directory.
    It can be accessed with the default url: http://localhost:8080/stateless.war/

Extra steps

An online documentation about EasyBeans/Jetty is available on EasyBeans web site.

Contact the core Jetty developers at
private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery