1 22 package org.jboss.ejb3.test.service; 23 24 import javax.ejb.Local ; 25 import javax.ejb.Remote ; 26 import org.jboss.annotation.ejb.Depends; 27 import org.jboss.annotation.ejb.LocalBinding; 28 import org.jboss.annotation.ejb.RemoteBinding; 29 import org.jboss.annotation.ejb.Service; 30 31 35 @Service 36 @RemoteBinding(jndiBinding = "serviceTwo/remote") 37 @LocalBinding (jndiBinding = "serviceTwo/local") 38 @Depends ("jboss.j2ee:service=EJB3,jar=service-test.jar,name=ServiceOne,type=ManagementInterface") 39 @Remote (ServiceTwoRemote.class) 40 @Local (ServiceTwoLocal.class) 41 public class ServiceTwo implements ServiceTwoLocal, ServiceTwoRemote 42 { 43 boolean called; 44 45 public boolean getCalled() 46 { 47 return called; 48 } 49 50 public void setCalled(boolean called) 51 { 52 this.called = called; 53 } 54 55 public void localMethod() 56 { 57 called = true; 58 } 59 60 public void remoteMethod() 61 { 62 called = true; 63 } 64 } 65 | Popular Tags |