File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB Certification (SCBCD/OCPJBCD) and the fly likes @Resource & mappedName Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » EJB Certification (SCBCD/OCPJBCD)
Bookmark "@Resource & mappedName" Watch "@Resource & mappedName" New topic
Author

@Resource & mappedName

Benoît de Chateauvieux
Ranch Hand

Joined: Aug 10, 2007
Posts: 183
Hi all,

I try to test simples environment entries in my OC4J and I don't understand the difference between the attributes name and mappedName of the annotation @Resource.

I wrote the following ejb-jar:


And in my bean:


It works only with mappedName and no with name.
Any idea?
Thanks a lot for your help!


SCJP5 | SCBCD5 | SCEA5 Part 1
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

mappedName is container dependant, and should be avoided. There's an article here about injecting environment entries.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: @Resource & mappedName
 
Similar Threads
Problem looking up local interface of Session Beans - WSAD 5.1, WAS 5.0 Test Env
env-entry tag
env-entries
where should I put ejb-jar.xml
Setting up enviornment variables