< Zurück | Inhalt | Weiter >

21.2.3 Under the Hood

We’re not going to take apart the source code for JBoss here, but we do want to spend some time talking about what is going on in an EJB container. It isn’t magic. The whole system is built on some familiar technologies that you can learn all about if you want to. First of all, the default protocol for EJB session and entity beans is RMI. That’s right. A major part of an EJB container is the code to set up RMI connections between beans and clients. RMI is an applica- tion protocol that defines how to encode the state of a Java class, transfer it over a network (using TCP/IP sockets), and restore the coded data to a local imple- mentation of the class (the encoding/decoding process is called marshaling/ unmarshaling). That’s part one. Knowing where to find the appropriate bean is the next part.


21.3 WHATS IN A NAME? AN INTRODUCTION TO JNDI


JNDI abstracts a type of service known generically as a directory service. We need to introduce that concept and then describe a few common examples of such systems. Then we can explain how JNDI abstracts these various services.