1 7 package org.jboss.tutorial.service.bean; 8 9 import org.jboss.annotation.ejb.Service; 10 import org.jboss.annotation.ejb.Depends; 11 import org.jboss.annotation.ejb.Depends; 12 13 17 @Service (objectName = "tutorial:service=serviceTwo") 18 @Depends ("jboss.j2ee:name=org.jboss.tutorial.service.bean.ServiceOne,service=EJB3,type=service") 19 public class ServiceTwo implements ServiceTwoManagement 20 { 21 public String sayHello() 22 { 23 return "Hello from service Two"; 24 } 25 26 public void start() throws Exception 28 { 29 System.out.println("ServiceTwo - Starting"); 30 } 31 32 public void stop() 33 { 34 System.out.println("ServiceTwo - Stopping"); 35 } 36 } 37 | Popular Tags |