Details
-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
None
-
None
Description
You have a simple Stateless Session Bean:
@Stateless
@Remote(
)
@RemoteBinding(jndiBinding = "ejb3/TestSession")
public class TestSessionBean implements TestSession {
@Resource(name="paramOne")
private String paramOne = "";
public String getParamOne()
{ return paramOne; }}
And the deployment descriptor (corresponding part):
<enterprise-beans>
<session id="TestSession">
<ejb-name>TestSession</ejb-name>
<env-entry>
<env-entry-name>
paramOne
</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>valueOne</env-entry-value>
</env-entry>
</session>
</enterprise-beans>
This does not work!
The value is not injected.
It only is injected if you use the Stateless annotation with name parameter:
@Stateless(name="TestSession")
This is not acceptable because you would want to have several SessionBeans defined by the same bean class.