[jboss-user] [EJB 3.0] - Re: Not injecting instanceId, no matching enc injector ...
jaikiran
do-not-reply at jboss.com
Tue Dec 30 04:01:14 EST 2008
Which version of JBossAS do you use? Your example should have worked.
Try this instead (note the name="instanceId" for the @Resource annotation)
@Stateless
| public class StatelessLifecycleBean implements HelloWorld {
| private static int instanceCount = 0;
|
|
| @Resource (name="instanceId")
| private Integer instanceId;
| }
<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>
|
| </env-entry>
| </session>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4198879#4198879
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4198879
More information about the jboss-user
mailing list