• 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
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!