1 4 package org.objectweb.jonas.stests.appli; 5 6 import javax.naming.Context ; 7 import javax.naming.InitialContext ; 8 import javax.naming.NamingException ; 9 import javax.rmi.PortableRemoteObject ; 10 11 14 public class OrderClient { 15 16 static Context ctx = null; 17 static OrderHome home = null; 18 19 public static void main(String [] arg) { 20 21 try { 23 ctx = new InitialContext (); 24 } catch (NamingException e) { 25 e.printStackTrace(); 26 System.exit(2); 27 } 28 29 String bName = "OrderHome"; 31 try { 32 home = (OrderHome) PortableRemoteObject.narrow(ctx.lookup(bName), OrderHome.class); 33 34 } catch(Exception e) { 35 e.printStackTrace(); 36 System.exit(2); 37 } 38 39 } 41 } 42 | Popular Tags |