Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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 ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

JavaMail Problem with WAS 3.5

 
Greenhorn
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">
<session-timeout>0</session-timeout>
<state-management>STATEFUL_SESSION</state-management>
<home-interface>com.globebyte.rp.service.emailservice.EmailSenderHome</home-interface>
<remote-interface>com.globebyte.rp.service.emailservice.EmailSenderRemote</remote-interface>
<enterprise-bean>com.globebyte.rp.service.emailservice.EmailSenderEjb</enterprise-bean>
<jndi-name>com/globebyte/rp/service/emailservice/EmailSenderHome</jndi-name>
<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>
<session-bean dname="com/ibm/caf/mail/ReadMailEJB.ser">
<session-timeout>0</session-timeout>
<state-management>STATEFUL_SESSION</state-management>
<home-interface>com.ibm.caf.mail.ReadMailEJBHome</home-interface>
<remote-interface>com.ibm.caf.mail.ReadMailEJB</remote-interface>
<enterprise-bean>com.ibm.caf.mail.ReadMailEJBBean</enterprise-bean>
<jndi-name>ReadMailEJB</jndi-name>
<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>
<session-bean dname="com/ibm/caf/mail/SendMailEJB.ser">
<session-timeout>0</session-timeout>
<state-management>STATEFUL_SESSION</state-management>
<home-interface>com.ibm.caf.mail.SendMailEJBHome</home-interface>
<remote-interface>com.ibm.caf.mail.SendMailEJB</remote-interface>
<enterprise-bean>com.ibm.caf.mail.SendMailEJBBean</enterprise-bean>
<jndi-name>SendMailEJB</jndi-name>
<transaction-attr value="TX_REQUIRED"/>
<isolation-level value="SERIALIZABLE"/>
<run-as-mode value="SPECIFIED_IDENTITY"/>
</session-bean>

can anyone tell us where we r going wrong .Thanks in advance
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic