wood burning stoves 2.0*
The moose likes Websphere and the fly likes JavaMail Problem with WAS 3.5 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "JavaMail Problem with WAS 3.5" Watch "JavaMail Problem with WAS 3.5" New topic

JavaMail Problem with WAS 3.5

dhanu varma

Joined: Oct 26, 2001
Posts: 9
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
Don't get me started about those stupid light bulbs.
subject: JavaMail Problem with WAS 3.5