-
Example 10 shows code
that:
-
Gets an initial context for the JNDI
-
Looks up the name of the home interface for the User EJB
-
Creates a new User EJB
-
Invokes a method on the newly created bean
-
Note that the code is relatively straightforward, but there are a number of
exceptions
-
Not uncommon with distributed systems - there are more failure modes
-
The exceptions here are:
-
UserException: Application exception defined by bean designer
-
CreateException: EJB exception - application level inability to create bean
-
RemoteException: RMI exception - system level exception at the server
-
NamingException: JNDI exception - problems with looking up names
|