JNDI lookup with a corbaname URL
by , 11-01-2011 at 06:09 PM (776 Views)
A corbaname can be useful at times as a lookup name. If, for example, the target object is not a member of the federated name space and cannot be located with a qualifiied name, a corbaname can be a convenient way to look up the object.
A lookup with a corbaname URL follows.
Java Code:// Get the initial context as shown in a previous example. ... // Look up the home interface using a corbaname URL. try { java.lang.Object ejbHome = initialContext.lookup( "corbaname:iiop:someHost:2809#com/mycompany/accounting/AccountEJB"); accountHome = (AccountHome)javax.rmi.PortableRemoteObject.narrow(ejbHome, AccountHome.class); } catch (NamingException e) { // Error getting the home interface ... }









Email Blog Entry
Size Reduced for Images in PDF &...
05-15-2013, 05:53 PM in Java Software