Discuss this tutorial. Printable version (PDF).
Go to Contents page. Go to previous page. Go up a level. Go to next page.

 

 

Design


When you build an application with BC4J, you essentially get the underlying design pattern implementations for free. For example, you can use BC4J to build two different kinds of EJB Session Bean Façades:

  • A classic EJB Session Bean called a "Service Session Bean" that exploits BC4J's generic design pattern components exclusively inside its own private implementation, but does not expose these framework objects to the remote client.

  • An enhanced EJB Session Bean called an "AppModule Session Bean" that provides full remote access to the BC4J design pattern components and features, including the implementation of a clever "Value Messenger" pattern that considerably reduces typical EJB client network traffic.

The Service Session Bean option is typically used when your EJB Session Bean interface must be given to third-party developers to interface programmatically with your application. The AppModule Session Bean option is best when you know that the client to your EJB Session Bean will be a client interface developed by your team (JSP, Servlet, Swing, etc.).

OTN developers chose to use enhanced EJB Session Beans for the BC4J-VSM because the enhanced beans act as wrappers for the BC4J application modules, enabling remote clients to access the distributed app modules in a standard way.

For either option, at deployment time you can select whether you want to use a Bean-Managed Transaction (BMT) or a Container-Managed Transaction (CMT). As required by the EJB spec, when deploying as a CMT bean, BC4J implements the SessionSynchronization interface for you so the container can drive the transaction boundary. With the BMT bean deployment choice, the BC4J framework coordinates the call to the expected methods on the JTA UserTransaction object as a part of its commit processing.

In general, bean-managed transactions are simpler than container-managed transactions and have no disadvantages. However, the choice between BMT and CMT choice should be governed by application requirements. For example, an application that integrates BC4J components with some non-BC4J EJB components in the same transaction would require CMT. Because the BC4J-VSM uses only BC4J components, OTN developers chose BMT.

Entity Diagram

The figure below, created using JDeveloper, shows the most important BC4J-VSM entities and the relationships (called associations) between them.

VSM entities

 

Other apects of the BC4J-VSM design are covered in various lessons in this tutorial series.


Discuss this tutorial. Printable version (PDF).
Go to Contents page. Go to previous page. Go up a level. Go to next page.
E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy