1 22 package org.jboss.ejb3.test.naming.bad; 23 24 import javax.ejb.Remove ; 25 import javax.annotation.PostConstruct; 26 import javax.ejb.Stateless ; 27 import javax.annotation.Resource; 28 29 35 @Stateless 36 public class BadFieldMethodBean implements BadInjector 37 { 38 private @Resource String key; 39 40 @PostConstruct 41 public void init() 42 { 43 System.out.println("PostConstruct state, key="+key); 44 } 45 46 @Resource 47 public void setKey(String key) 48 { 49 this.key = key; 50 System.out.println("setKey, key="+key); 51 } 52 53 public String getKey() 54 { 55 System.out.println("ping, key="+key); 56 return key; 57 } 58 59 @Remove 60 public void remove() 61 { 62 } 63 64 } 65 | Popular Tags |