• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

JavaMail Problem with WAS 3.5

Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are using the third party too for sending mail from our system.It is the ibm.caf.mail APi and the deployed MAILEjb jars which contain the (sendMail and ReadMail Ejb)
we have wrapped these bean in our own state full session bean which get a refrence of CAF SendMail interface and sends mail.
I have tested this EJB in the VAJ 3.5 Test Environment for EJB's and it works fine and sends mail ,but when we export the deployed jar on to the WAS(3.5) and run a sample jsp which gets a refrence of the EJB and call the send method --we end with a MailException .

This is our send method code where it fails.
SendMail mailSender = null;
try {
mailSender = SendMailFactory.create(mailhost);
} catch (MailException e) {
throw new SendFailedException(e, "Failed to obtain a reference to the SendMail interface.");

Do I need to specify anything while creating the jar in the xml file.We export the Deployed jar and then delete all the .ser file and re-run this file with our own xml file which the the following attributes for the Beans.
<session-bean dname="com/globebyte/rp/service/emailservice/EmailSender.ser">
<transaction-attr value="TX_SUPPORTS"/>
<isolation-level value="READ_COMMITTED"/>
<run-as-mode value="SPECIFIED_IDENTITY"/>
<env-prop name="dbProductName" comment="">DB2</env-prop>
<env-prop name="mailhost" comment="">XXX.XXX.XXX.XXX</env-prop>
<session-bean dname="com/ibm/caf/mail/ReadMailEJB.ser">
<transaction-attr value="TX_REQUIRED"/>
<isolation-level value="SERIALIZABLE"/>
<run-as-mode value="SPECIFIED_IDENTITY"/>
<env-prop name="dbProductName" comment="">DB2</env-prop>
<session-bean dname="com/ibm/caf/mail/SendMailEJB.ser">
<transaction-attr value="TX_REQUIRED"/>
<isolation-level value="SERIALIZABLE"/>
<run-as-mode value="SPECIFIED_IDENTITY"/>

can anyone tell us where we r going wrong .Thanks in advance
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic