1 package jca.simple; 2 3 import javax.naming.InitialContext ; 4 5 public class SimpleClient { 6 7 public static void main(String args[]) 8 throws Exception { 9 10 InitialContext iniCtx = new InitialContext (); 11 Object ref = iniCtx.lookup("SimpleBean"); 12 SimpleHome home = (SimpleHome) ref; 13 Simple simple = home.create(); 14 System.out.println("Created Simple"); 15 simple.put(args[0], args[1]); 16 System.out.println("Simple.get('" + args[0] + "') = " + 17 simple.get(args[0])); 18 simple.removeDatabase(); 19 System.out.println("simple.removeDatabase()"); 20 } 21 } 22 | Popular Tags |