EJB in 30 Seconds

I l @ ve RuBoard

EJB is a complicated beast ; it would require an entire book to cover it in detail. In this chapter, complex issues such as transaction control won't be covered. Instead, here is a very quick overview of how EJB works for distributed processing.

To begin, you need an EJB server. This is the centralized beast that actually does all the work. In the examples, you'll be using the open source JBoss platform. On this server, you'll put two of the three pieces of your application: the remote interface and the enterprise bean. The third piece (the home interface) will live on the client and will be used to communicate with the server.

The remote interface is just an interface that describes the distributed class and what messages it legally can handle. The bean is the actual code that does the work. It needs to match the remote interface as far as the signature of each of the methods is concerned .

On the client side, you will use the home interface. The home interface is just an interface that describes the available methods that you can use to create or find instances of the class.

To use the distributed class, you should use JNDI to get a handle on the remote EJB server, request an instance of your home interface, and then use the interface to invoke a remote call on the EJB server.

I l @ ve RuBoard


MySQL and JSP Web Applications. Data-Driven Programming Using Tomcat and MySQL
MySQL and JSP Web Applications: Data-Driven Programming Using Tomcat and MySQL
ISBN: 0672323095
EAN: 2147483647
Year: 2002
Pages: 203
Authors: James Turner

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