| Title: Examples Table |
| {span:class=ExamplesTable} |
| <table> |
| <tr><th> title </th><th> description </th><th> APIs used </th></tr> |
| <tr><td> {div:class=Cel1}*[Simple Stateless](simple-stateless-example.html) |
| *{div} </td><td> Simple EJB3 *@Stateless* bean with local and remote business |
| interfaces and unit test. </td><td> - javax.ejb.Remote |
| </tr> |
| - javax.ejb.Local |
| - javax.ejb.Stateless |
| <tr></tr> |
| <tr><td> *[Simple Stateful](simple-stateful-example.html) |
| * </td><td> Simple EJB3 *@Stateful* bean with local and remote business interfaces |
| and unit test. </td><td> - javax.ejb.Remote |
| </tr> |
| - javax.ejb.Stateful |
| <tr></tr> |
| <tr><td> *[EJB 3.1 Singleton](singleton-example.html) |
| * </td><td> Shows two EJB 3.1 *@Singleton* beans. One configured to load on |
| startup via *@Startup* and using Bean-Managed Concurrency and |
| synchronization. Another using Container-Managed Concurrency via |
| *@Lock(READ)* and *@Lock(WRITE)*. </td><td> - javax.annotation.PostConstruct |
| </tr> |
| - javax.annotation.PreDestroy |
| - javax.ejb.ConcurrencyManagement |
| - javax.ejb.Lock |
| - javax.ejb.Singleton |
| - javax.ejb.Startup |
| - javax.ejb.ConcurrencyManagementType.BEAN |
| - javax.ejb.LockType.READ |
| - javax.ejb.LockType.WRITE |
| <tr></tr> |
| <tr><td> *[EJB 2.1 Compatibility](ejb-2.1-compatibility-example.html) |
| * </td><td> Shows an EJB 3.0 Stateful bean with Business interfaces and EJB 2.1 |
| interfaces (now called "component" interfaces) using the *@LocalHome* and |
| *@RemoteHome*. Four interfaces in total. </td><td> - javax.ejb.CreateException |
| </tr> |
| - javax.ejb.EJBHome |
| - javax.ejb.EJBLocalHome |
| - javax.ejb.EJBLocalObject |
| - javax.ejb.EJBObject |
| - javax.ejb.Init |
| - javax.ejb.Local |
| - javax.ejb.LocalHome |
| - javax.ejb.Remote |
| - javax.ejb.RemoteHome |
| - javax.ejb.Remove |
| - javax.ejb.Stateful |
| <tr></tr> |
| <tr><td> *[Injection of env-entry](injection-of-env-entry-example.html) |
| * </td><td> Shows how *@Resource* can be used to inject **env-entry** values |
| declared in an ejb-jar.xml file </td><td> - javax.annotation.Resource |
| </tr> |
| - javax.ejb.Local |
| - javax.ejb.Remote |
| - javax.ejb.Stateful |
| <tr></tr> |
| <tr><td> *[Injection of env-entry 2](custom-injection.html) |
| * </td><td> Same as the above example but shows how to use a *properties file* to |
| declare the injection values and demonstrates how to get injection of *more |
| types* such as java.util.Date, java.lang.Class, java.net.URI and more. |
| _OpenEJB specific feature_. </td><td> - javax.annotation.Resource |
| </tr> |
| - javax.ejb.Stateless |
| <tr></tr> |
| <tr><td> *[Injection of other EJBs](injection-of-other-ejbs-example.html) |
| * </td><td> Shows use of *@EJB* in a Stateless to have another Stateless bean |
| injected into it. </td><td> - javax.ejb.EJB |
| </tr> |
| - javax.ejb.Local |
| - javax.ejb.Remote |
| - javax.ejb.Stateless |
| <tr></tr> |
| <tr><td> *[Injection of DataSource](injection-of-datasource-example.html) |
| * </td><td> Shows use of *@Resource* to have a JDBC *DataSource* injected into a |
| Stateful bean. The Stateful bean does basic INSERT, SELECT and DELETE SQL |
| operations. </td><td> - javax.annotation.PostConstruct |
| </tr> |
| - javax.annotation.Resource |
| - javax.ejb.Stateful |
| - javax.sql.DataSource |
| <tr></tr> |
| <tr><td> *[Injection of EntityManager](injection-of-entitymanager-example.html) |
| * </td><td> Shows use of *@PersistenceContext* to have an *EntityManager* with an |
| *EXTENDED* persistence context injected into a @Stateful bean. An EJB 3 |
| *@Entity* bean is used with the EntityManager to create, persist and merge |
| data to a database. </td><td> - javax.ejb.Stateful |
| </tr> |
| - javax.persistence.Entity |
| - javax.persistence.EntityManager |
| - javax.persistence.PersistenceContext |
| - javax.persistence.PersistenceContextType.EXTENDED |
| - javax.persistence.Query |
| <tr></tr> |
| <tr><td> *[Testing Transactions](testing-transactions-example.html) |
| * </td><td> Shows use of @PersistenceContext to have an *EntityManager* with an |
| *TRANSACTION* persistence context injected into a *@Stateful* bean using |
| the *@TransactionAttribute* annotation and a TestCase that runs test code |
| in a JTA *Transaction*. An EJB 3 @Entity bean is used with the |
| EntityManager to create, persist and merge data to a database. </td><td> - |
| javax.ejb.Stateful |
| </tr> |
| - javax.ejb.Stateless |
| - javax.ejb.TransactionAttribute |
| - javax.ejb.TransactionAttributeType.MANDATORY |
| - javax.ejb.TransactionAttributeType.REQUIRES_NEW |
| - javax.persistence.Entity |
| - javax.persistence.EntityManager |
| - javax.persistence.PersistenceContext |
| - javax.persistence.PersistenceContextType.TRANSACTION |
| - javax.persistence.Query |
| <tr></tr> |
| <tr><td> *[Testing Security](testing-security-example.html) |
| * </td><td> Builds upon the [Injection of EntityManager Example] |
| but adds the use of *@RolesAllowed* and *@PermitAll* in the @Stateful bean |
| to restrict who can perform create, persist and remove operations on the |
| EntityManager. Shows a TestCase using the *@RunAs* annotation to execute |
| and test the bean code as various users. </td><td> - |
| javax.annotation.security.PermitAll |
| </tr> |
| - javax.annotation.security.RolesAllowed |
| - javax.annotation.security.RunAs |
| - javax.ejb.EJBAccessException |
| - javax.ejb.Stateful |
| - javax.ejb.Stateless |
| - javax.ejb.TransactionAttribute |
| - javax.ejb.TransactionAttributeType.SUPPORTS |
| - javax.persistence.Entity |
| - javax.persistence.EntityManager |
| - javax.persistence.PersistenceContext |
| - javax.persistence.PersistenceContextType.EXTENDED |
| - javax.persistence.Query |
| <tr></tr> |
| <tr><td> *[Embedded and Remotable](embedded-and-remotable.html) |
| * </td><td> Demonstrates how to use an OpenEJB feature that allows people embedding |
| OpenEJB into their applications to support remote clients in other VMs. |
| This is not required for unit testing. </td><td> - javax.ejb.Remote |
| </tr> |
| - javax.ejb.Stateful |
| <tr></tr> |
| <tr><td> *[Helloworld Weblogic](helloworld-weblogic.html) |
| * </td><td> Demonstrates OpenEJBs ability to understand and support the WebLogic |
| deployment descriptors so people using that platform in production can |
| still use OpenEJB in their IDE or build to unit test their EJB |
| applications. </td><td> - javax.ejb.CreateException |
| </tr> |
| - javax.ejb.EJBLocalHome |
| - javax.ejb.EJBLocalObject |
| - javax.ejb.LocalHome |
| - javax.ejb.Stateless |
| <tr></tr> |
| <tr><td> *[JSF Injection Support](jsf-injection-support.html) |
| * </td><td> Demonstrates OpenEJBs ability to inject EJB's into JSF managed beans. </td><td> |
| - javax.ejb.Stateless |
| </tr> |
| <tr></tr> |
| <tr><td> *[Struts with OpenEJB and Tomcat](struts-with-openejb-and-tomcat.html) |
| * </td><td> Demonstrates the usage of Struts within an OpenEJB + Tomcat |
| environment. </td><td> - javax.ejb.Stateless |
| </tr> |
| <tr></tr> |
| <tr><td> *[Applets with OpenEJB](applets-with-openejb.html) |
| * </td><td> Demonstrates how an applet can communicate with a remote stateless |
| session bean. The stateless session bean is deployed in an OpenEJB + Tomcat |
| environment </td><td> - javax.ejb.Stateless |
| </tr> |
| <tr></tr> |
| {span} |
| </table> |
| |