I have two proxies within my OSB 11g project-
1. MailSender proxy- used to send emails to the customer. I am actually using Java code to send emails inside this message flow. The parameters to the java code are passed using DVMs.
2. Reprocessing proxy- polls another mailbox for undelivered/bounce back emails.
I have deployed this code in a clustered environment with 2 nodes hosting 2 JVMs (osb servers) each. The MailSender proxy is distributed on each JVM while Reprocessing proxy is(can be) targetted to only one JVM.
The issue I am facing is- whichever JVM this Reprocessing proxy is deployed on, that particular JVM is picking up localhost as the SMTP host (in MailSender proxy) - even though the server name is passed correctly.
Logs for MailSender proxy-
</dynamicValues>"
ServerName="smtp-server.qwerty.com"
fault="<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-382515</con:errorCode>
<con:reason>Callout to java method "public static java.lang.String com.twc.sn.SendMail.callEmailService(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) throws java.lang.Exception" resulted in exception: Could not connect to SMTP host: localhost, port: 25
- javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 25;
nested exception is:
java.net.ConnectException: Connection refused
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1391)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:412)
at javax.mail.Service.connect(Service.java:288)
at javax.mail.Service.connect(Service.java:169)
at javax.mail.Service.connect(Service.java:118)
at javax.mail.Transport.send0(Transport.java:188)
at javax.mail.Transport.send(Transport.java:118)
at com.twc.sn.SendMail.send(SendMail.java:69)
at com.twc.sn.SendMail.callEmailService(SendMail.java:88)
at sun.reflect.GeneratedMethodAccessor4529.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at stages.transform.runtime.JavaCalloutRuntimeStep$1.run(JavaCalloutRuntimeStep.java:183)
Please let me know if someone has faced this issue or knows a solution to this.
Regards,
Tarun