[jboss-user] [EJB 3.0] - Not injecting instanceId, no matching enc injector ...

green_bean_1 do-not-reply at jboss.com
Mon Dec 22 17:33:16 EST 2008


I am trying to get a very simple field resource injection example to work. however, when i deploy the example, i get the following error in the log file. 

15:26:44,644 WARN  [ResourceHandler] Not injecting instanceId, no matching enc injector env/com.di.examples.ejb.StatelessLifecycleBean/instanceId found

any ideas?

thankx



  | @Remote
  | public class StatelessLifecycleBean implements HelloWorld {
  |     private static int instanceCount = 0;
  | 
  | 
  |     @Resource private Integer instanceId;
  | 
  |     private String instanceMessage;
  | 
  |     public StatelessLifecycleBean() {
  |         instanceId = ++instanceCount;
  |         instanceMessage = getClass().getSimpleName() + "-" + instanceId;
  |     }                                           
  | 
  |     public String getMessage() {
  |         return instanceMessage;
  |     }
  | 



  | ...
  | <session>
  |             <ejb-name>StatelessLifecycle</ejb-name>
  |             <ejb-class>com.di.examples.ejb.StatelessLifecycleBean</ejb-class>
  |             <env-entry>
  |                 <env-entry-name>instanceId</env-entry-name>
  |                 <env-entry-type>java.lang.Integer</env-entry-type>
  |                 <env-entry-value>5</env-entry-value>
  |                 <injection-target>
  |                     <injection-target-class>com.di.examples.ejb.StatelessLifecycleBean</injection-target-class>
  |                     <injection-target-name>instanceId</injection-target-name>
  |                 </injection-target>
  |             </env-entry>
  |         </session>
  | ...
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198116#4198116

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198116



More information about the jboss-user mailing list