1 22 package org.jboss.tutorial.service_deployment_descriptor.bean; 23 24 import javax.ejb.Local ; 25 import javax.ejb.Remote ; 26 import org.jboss.annotation.ejb.Service; 27 import org.jboss.annotation.ejb.Management; 28 29 30 34 public class ServiceOne implements ServiceOneLocal, ServiceOneRemote, ServiceOneManagement 35 { 36 int attribute; 37 38 public void setAttribute(int attribute) 39 { 40 this.attribute = attribute; 41 } 42 43 public int getAttribute() 44 { 45 return this.attribute; 46 } 47 48 public String sayHello() 49 { 50 return "Hello from service One"; 51 } 52 53 public void create() throws Exception 55 { 56 System.out.println("ServiceOne - Creating"); 57 } 58 59 public void start() throws Exception 60 { 61 System.out.println("ServiceOne - Starting"); 62 } 63 64 public void stop() 65 { 66 System.out.println("ServiceOne - Stopping"); 67 } 68 69 public void destroy() 70 { 71 System.out.println("ServiceOne - Destroying"); 72 } 73 } 74 | Popular Tags |