1 7 8 package org.jboss.test.jbossnet.ejbsimple.server; 9 10 import javax.ejb.EJBException ; 11 12 import org.jboss.test.util.ejb.SessionSupport; 13 14 import org.jboss.test.jbossnet.ejbsimple.HelloData; 15 import org.w3c.dom.Element ; 16 17 32 33 public class HelloLocalBean 34 extends SessionSupport 35 implements javax.ejb.SessionBean { 36 40 41 public String hello(String name) { 42 return "Hello " + name + "!"; 43 } 44 45 49 50 public String howdy(HelloData name) { 51 return "Howdy " + name.getName() + "!"; 52 } 53 54 58 59 public void throwException() { 60 throw new EJBException ("Something went wrong"); 61 } 62 63 67 public Object [] arrays(Object [] values) { 68 return values; 69 } 70 71 75 public Object [] reverse(Object [] values) { 76 Object [] result = new Object [values.length]; 77 for (int i = 0; i < values.length; ++i) 78 result[i] = values[values.length - i - 1]; 79 return result; 80 } 81 82 86 public HelloData[] typedArrays(HelloData[] values) { 87 return values; 88 } 89 90 94 95 public Element element(Element in) { 96 return in; 97 } 98 } 99 | Popular Tags |