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 OrderPlacementClient { 15 16 static Context ctx = null; 17 static OrderPlacementHome 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 = "OrderPlacementHome"; 31 try { 32 home = (OrderPlacementHome) PortableRemoteObject.narrow(ctx.lookup(bName), OrderPlacementHome.class); 33 OrderPlacement bean = home.create(); 34 35 } catch(Exception e) { 36 e.printStackTrace(); 37 System.exit(2); 38 } 39 40 } 42 } 43 | Popular Tags |