FileDocCategorySizeDatePackage
ServiceThree.javaAPI DocJBoss 4.2.12813Fri Jul 13 20:55:12 BST 2007org.jboss.tutorial.service_deployment_descriptor.bean

ServiceThree

public class ServiceThree extends Object implements ServiceThreeManagement
author
Kabir Khan
version
$Revision: 60233 $

Fields Summary
public ObjectName
serviceOneName
private ServiceTwoManagement
service2
Constructors Summary
Methods Summary
public java.lang.Objectintercept(javax.interceptor.InvocationContext ctx)

      System.out.println("ServiceThree - Interceptor");
      return ctx.proceed();
   
public java.lang.StringserviceOneHello()

      Object[] args = new Object[0];
      String[] signature = new String[0];
      System.out.println("ServiceThree - Calling ServiceOne.sayHello() via JMX server");
      MBeanServer server = (MBeanServer)MBeanServerFactory.findMBeanServer(null).get(0);
      return (String)server.invoke(serviceOneName, "sayHello", args, signature);
   
public java.lang.StringserviceTwoHello()

      System.out.println("ServiceThree - Calling ServiceTwo.sayHello() via MBean proxy");
      return service2.sayHello();
   
public voidsetServiceTwo(ServiceTwoManagement service2)

      this.service2 = service2;
   
public voidstart()

      System.out.println("ServiceThree - Starting");
   
public voidstop()

      System.out.println("ServiceThree - Stopping");