O'Reilly logo

Building Java Enterprise Applications by Brett McLaughlin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Checkpoint

You are now ready to prepare a client to access your beans and manager, and populate the data stores. Before coding this test client, ensure that you have all your Java classes set up and ready for use. As this is a book about enterprise applications, usually distributed across multiple machines, this is not as simple as in a traditional, standalone application. Often certain classes are on one server, while others are on another server; there are backups, load-balanced servers, fail-over servers, and so on. The Forethought application has a fairly simplistic setup: all classes are located on a single server. This represents the logical unit, which in your own applications may be a single physical server, or may be multiple servers. For example, you might have entity beans on one server, session beans on another, your web server on a third, and then have multiple machines for backup on top of those.

Additionally, you will have clients that are presumably separate from the server. I will assume that any clients are physically separate from the server and its code, as that is the typical case in enterprise applications. The trick, then, is getting the right classes on the server for the server to operate, and then the right classes on the client to allow access to the server. Server classes are simple: for the most part, you’ll just throw everything on the server. With EJB, for example, the remote and home interface, the primary key class, a value class (if there is one), ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required