9.6 Summary


This chapter looked at the EJB component model and its relationship to JDO. Various implementation topics were addressed with extensive source code examples. Higher-level conceptual and architectural issues were also discussed.

In summary, if your application requires distributed and transactional persistent components , use EJB entity beans. In this case, if you are happy with the CMP entity bean implementations that your container provides, JDO is not for you. If you are not, but your design really does require distributed and transactional persistent objects, BMP entity beans implemented using JDO may be the answer. For the rest of us, and that's the vast majority, JDO provides a better alternative over EJB entity beans.

If you are looking at implementing a service-oriented architecture accessible from remote EJB or CORBA fat clients , then EJB session beans are a great way to go. This architecture requires the passing of data transfer objects between tiers, as always, but JDO can easily be used to retrieve and update persistent state. The chapter presented the practical details and options in such an approach.

If message-oriented features are of interest, the message-driven EJB component type can possibly be helpful. This chapter presented the integration of JDO in this sort of bean as well.

However, if you are looking at implementing the average Web-based enterprise application and would like a simple yet effective architecture, using JDO in plain Java objects that are VM local to the Servlet tier is a perfectly acceptable architecture. If Web-service support is of interest, this can be supported as well, without EJB.

As we have seen, even without the use of EJB, a reasonable scalability can be achieved by using a clustered-system architecture with a distributed cache synchronization with a JDO implementation that supports such an approach.



Core Java Data Objects
Core Java Data Objects
ISBN: 0131407317
EAN: 2147483647
Year: 2003
Pages: 146

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net