• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

petstore servicelocator

 
Marie Pierre Courbevoie
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In petstore 1.3.2 ServiceLocator class is used to lookup ejb references, jms resources, data sources, url, strings.... but mail session is retrieved in the code of the MailHelper class:
try {
InitialContext ic = new InitialContext();
Session session = (Session) ic.lookup(JNDINames.MAIL_SESSION);
......
JNDINames is only a class container with a public static final String variable (Mail_SESSION= "java:comp/env/mail/MailSession"

Any coherent explaination ?
Thankx

Marie Pierre
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic