Web site developers - EJB Fundamentals 41 throws java.rmi.RemoteException; public boolean isIdentical(javax.ejb.EJBObject)
EJB Fundamentals 41 throws java.rmi.RemoteException; public boolean isIdentical(javax.ejb.EJBObject) throws java.rmi.RemoteException; } Source 2.2 (continued) The client code that wants to work with your beans calls the methods in javax.ejb.EJBObject. This client code could be standalone applications, applets, servlets, or anything at all even other enterprise beans. In addition to the methods listed in Source 2.2, your remote interface duplicates your beans business methods. When a bean s client invokes any of these business methods, the EJB object delegates the method to its corresponding implementation, which resides in the bean itself. Java RMI-IIOP and EJB Objects You may have noticed that javax.ejb.EJBObject extends java.rmi.Remote. The java.rmi.Remote interface is part of Java Remote Method Invocation over the Internet Inter-ORB Protocol (RMI-IIOP). Any object that implements java.rmi.Remote is a remote object and is callable from a different JVM. This is how remote method invocations are performed in Java. (We fully describe this in Appendix A.) Because the EJB object provided by the container implements your remote interface, it also indirectly implements java.rmi.Remote. Your EJB objects are fully networked RMI-IIOP objects, able to be called from other JVMs or physical machines located elsewhere on the network. Thus, EJB remote interfaces are really just RMI-IIOP remote interfaces except that EJB remote interfaces must also be built to conform to the EJB specification. EJB remote interfaces must conform to the RMI-IIOP remote interface rules. For example, any method that is part of a remote object callable across virtual machines must throw a special remote exception. A remote exception is a java.rmi.RemoteException, or (technically) a subclass of it. A remote exception indicates that something unexpected happened on the network while you were invoking across virtual machines, such as a network, process, or machine failure. Every method shown in Source 2.2 for javax.ejb.EJBObject throws a java.rmi.RemoteException. Remote interfaces must conform to the RMI-IIOP parameter-passing conventions as well. Not everything can be passed over the network in a cross-VM method call. The parameters you pass in methods must be valid types for RMI-IIOP. This includes primitives, serializable objects, and RMI-IIOP remote objects. The full details of what you can pass are in Appendix A.
We provide special commissions and earns up to $125 us per referral for all website hosting directories. With such big commissions you should immediately sign up for our affiliate program for website hosting directory sites.