1 7 package org.jboss.test.jbossnet.admindevel; 8 9 10 import javax.ejb.EJBException ; 11 import javax.ejb.SessionContext ; 12 import java.rmi.RemoteException ; 13 14 27 public class HelloBean implements javax.ejb.SessionBean 28 { 29 33 public String helloString(String name) 34 { 35 return "Hello " + name + "!"; 36 } 37 38 42 public HelloReplyObj helloBean(HelloObj bean) 43 { 44 HelloReplyObj hro = new HelloReplyObj(); 45 hro.setMsg(helloString(bean.getMsg())); 46 return hro; 47 } 48 49 53 public Object [] helloArray(Object [] query) 54 { 55 Object [] reply = new Object [query.length]; 56 for (int n = 0; n < query.length; n++) 57 { 58 HelloObj hello = (HelloObj)query[n]; 59 HelloReplyObj hro = new HelloReplyObj(); 60 hro.setMsg(helloString(hello.getMsg())); 61 reply[n] = hro; 62 } 63 return reply; 64 } 65 66 public void setSessionContext(SessionContext ctx) throws EJBException , RemoteException 67 { 68 } 69 70 public void ejbCreate() 71 { 72 } 73 74 public void ejbRemove() 75 { 76 } 77 78 public void ejbActivate() 79 { 80 } 81 82 public void ejbPassivate() 83 { 84 } 85 } 86 | Popular Tags |