7.5. Administrator Client

Once we deploy our enterprise application and folks visit the web site, they will create a lot of Customer EJBs, Order EJBs, and LineItem EJBs. An administrator client program is often handy for inspecting a growing database. We'd also like to test our beans as we develop the system, as well as check the integrity of the CMP and CMR fields managed by the container behind the scenes on our behalf.

AdminClient.java

To this end, we've written a stand-alone Java client (AdminClient) that we use to inspect our database. As we add features to the CustomerSession EJB, we can also add methods to this program to test any new business methods.

Our program simply instantiates a CustomerSession EJB and uses the bean to find all ...

Get Enterprise JavaBeans™ Component Architecture: Designing and Coding Enterprise Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.