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

TimerServiceFieldInjector

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

Fields Summary
private Field
field
private org.jboss.ejb3.Container
container
Constructors Summary
public TimerServiceFieldInjector(Field field, org.jboss.ejb3.Container container)

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

      return field.getType();
   
public voidinject(java.lang.Object instance)

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

      try
      {
         field.set(ctx.getInstance(), container.getTimerService());
      }
      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 field: " + field.toString());
      }