Why do you want to use another jndi-name ? Why not simply use the given name 
java:/Mail ?

We use a stateless session bean for sending mails with this config and 
programming:
 * @ejb.resource-ref
  |  *              res-ref-name="Mail"
  |  *              res-type="javax.mail.Session"
  |  *              res-auth="Container"
  |  * @jboss.resource-ref
  |  *              res-ref-name="Mail"
  |  *              jndi-name="java:/Mail"
...
session = ServiceLocator.getInstance().getSession( "java:comp/env/Mail" );
...
As you can see, res-ref-name defines the the name under java:comp/env to use 
for accessing the ressource.
jndi-name is the name of the mail service in the jndi tree.


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

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


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to