On Nov 27, 2006, at 7:36 AM, Mike Perham wrote:
I've spent the last few days trying to figure out how to create an
system-wide javamail Session for application email usage.
I updated the javamail module in config.xml to point to my SMTP server
but can't find any documentation on how to create a session based on
that config. If someone has a working mail session, could you reply
with your plan? I'm using WAS CE 1.1.0.1.
I don't have an example, but the steps should be:
- add the javamail module as a dependency to your j2ee app
- use a resource-ref in your j2ee app of type javax.mail.Session. If
you name the resource-ref "mail/MailSession" and look up java:comp/
env/mail/MailSession you should be able to omit any configuration in
the geronimo plan for your app. Otherwise you can use the resource-
link element to point to mail/MailSession.
Hope this helps
david jencks
mike