FileDocCategorySizeDatePackage
TimerServiceMethodInjector.javaAPI DocJBoss 4.2.12589Fri Jul 13 20:53:46 BST 2007org.jboss.injection

TimerServiceMethodInjector

public class TimerServiceMethodInjector extends Object implements Injector
Comment
author
Bill Burke
version
$Revision: 60233 $
deprecated
use TimerServicePropertyInjector

Fields Summary
private Method
setMethod
private org.jboss.ejb3.Container
container
Constructors Summary
public TimerServiceMethodInjector(Method setMethod, org.jboss.ejb3.Container container)

      this.setMethod = setMethod;
      setMethod.setAccessible(true);
      this.container = container;
   
Methods Summary
public java.lang.ClassgetInjectionClass()

      return setMethod.getParameterTypes()[0];
   
public voidinject(java.lang.Object instance)

      throw new RuntimeException("SHOULD NOT BE INVOKED");
   
public voidinject(org.jboss.ejb3.BeanContext ctx)


      Object[] args = {container.getTimerService()};
      try
      {
         setMethod.invoke(ctx.getInstance(), args);
      }
      catch (IllegalAccessException e)
      {
         throw new RuntimeException(e);  //To change body of catch statement use Options | File Templates.
      }
      catch (IllegalArgumentException e)
      {
         throw new RuntimeException("Failed in setting EntityManager on setter method: " + setMethod.toString());
      }
      catch (InvocationTargetException e)
      {
         throw new RuntimeException(e.getCause());  //To change body of catch statement use Options | File Templates.
      }