public class AccountTest { public static void main(String args[]) { try { Properties p = new Properties(); p.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.ejs.ns.jndi.CNInitialContextFactory"); p.put(Context.PROVIDER_URL, "IIOP:///"); InitialContext ic = new InitialContext(p); Object aobj = ic.lookup("Account"); AccountHome aHome = (AccountHome) javax.rmi.PortableRemoteObject.narrow(aobj, AccountHome.class); Account acct = aHome.create(new AccountKey("pk1234")); // Initialize the new account AccountXMLAdaptor xmladaptor = new AccountXMLAdaptor(); xmladaptor.setACCTNUMBER(new Integer(1111)); xmladaptor.setSSN("123-45-6789"); xmladaptor.setBalance(new Double(1000000.00)); acct.initialize(xmladaptor.getXML()); // Retrieve bean information in XML Account acct = aHome.findByPrimaryKey(new AccountKey("pk1234")); AccountXMLAdaptor xmladaptor = new AccountXMLAdaptor(acct.getXML()); int acctnr = xmladaptor.getACCTNUMBER().intValue(); String SSN = xmladaptor.getSSN(); double balance = xmladaptor.getBALANCE().doubleValue(); } catch(Exception e) { e.printStackTrace(); } } // main } // AccountTest