I'm a bit confused as to how env-entry values are scoped when you specify multiple session beans using the same class. Using
this kind fellow's work as a starting point, I have a simple session bean defined thus:
Simple POJO, no annotations except the resource. To make sure my environment wasn't on acid (which, incidentally, consists of Sun's JVM and Glassfish V3.0.1 full), I configured this bean with the following ejb-jar.xml:
When I
test the class and call SimpleBean.getSomeValue(), it predictably returns "This is the value for SimpleBean", so the injection is clearly working. However, when I wire up two beans like so:
'This is the value for AnotherBean' injected is into
both OneBean and AnotherBean. I am looking up my
EJB's this way:
This begs the question: can you even configure two session beans using the same class, but with different names and configuration values? I'm sure the answer is staring me in the face, but four hours of Googling has not yielded a solution. Thanks in advance for your help!
Thanks,
Dan