What classes does a client application need to access EJB?
It is worthwhile to note that the client never directly interacts with the bean object but interacts with distributed object stubs or proxies that provide a network connection to the EJB container system. The mechanhism is as follows. 1. The client uses the JNDI context to get a remote reference (stub) to the home object ( the EJBHome). 2. It uses the home to get a remote reference (stub) to the EJBs remote object (the EJBObject) 3. It then invokes business methods on this remote object. The client needs the remote interface, the home interface, the primary key( if it is an entity bean). In addition to these, the client would need the JNDI factory implementation, and the remote and home stubs. In some EJB servers the Factory and/or stubs can be dynamically loaded at run time. In other EJB servers they must be in the classpath of the client application.
Related Questions
- Im preparing to deploy my WebLogic client application, and I want to separate out those classes that the client will not need. How do I do that?
- My application will consist of a client jar file and server jar file which share some common classes. How do I obfuscate it?
- What classes does a client application need to access EJB?