1 package wstest; 2 3 4 9 public class TestWebServiceImpl implements TestWebServiceSEI { 10 11 12 16 public String testOperation() throws java.rmi.RemoteException { 17 return lookupTestSessionBean().testMethod(); 18 } 19 20 private test.TestSessionLocal lookupTestSessionBean() { 21 try { 22 javax.naming.Context c = new javax.naming.InitialContext (); 23 test.TestSessionLocalHome rv = (test.TestSessionLocalHome) c.lookup("java:comp/env/ejb/TestSessionBean"); 24 return rv.create(); 25 } 26 catch(javax.naming.NamingException ne) { 27 java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ne); 28 throw new RuntimeException (ne); 29 } 30 catch(javax.ejb.CreateException ce) { 31 java.util.logging.Logger.getLogger(getClass().getName()).log(java.util.logging.Level.SEVERE,"exception caught" ,ce); 32 throw new RuntimeException (ce); 33 } 34 } 35 } 36 | Popular Tags |