Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

With EJB 3.0, it's now possible to write stateless session bean without specifying a deployment descriptor; you basically have to write just a remote or local business interface, which is a plain-old-java-interface, annotated with the @Remote or @Local annotation the stateless session bean implementation, a plain-old-java-object which implements the remote or the local business interface and is annotated with the @Stateless annotation

This example is the "simple-stateless" example located in the openejb-examples.zip available on the download page.

The Code

In this example we develop a simple EJB 3 Stateless session EJB. Every stateless session bean implementation must be annotated using the annotation @Stateless or marked that way in the ejb-jar.xml file.

...