1 7 package org.jboss.ejb3.injection; 8 9 import org.jboss.ejb3.BeanContext; 10 11 import java.lang.reflect.Field ; 12 13 19 public class EJBContextFieldInjector implements Injector 20 { 21 private Field field; 22 23 public EJBContextFieldInjector(Field field) 24 { 25 this.field = field; 26 } 27 28 public void inject(BeanContext ctx) 29 { 30 31 try 32 { 33 field.set(ctx.getInstance(), ctx); 34 } 35 catch (IllegalAccessException e) 36 { 37 throw new RuntimeException (e); 38 } 39 } 40 } 41 | Popular Tags |