[JBoss JIRA] (JBESB-3976) EmailRouter/Emailer shares config
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/JBESB-3976?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated JBESB-3976:
-------------------------------------------
Bugzilla Update: Perform
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1168279
> EmailRouter/Emailer shares config
> ---------------------------------
>
> Key: JBESB-3976
> URL: https://issues.jboss.org/browse/JBESB-3976
> Project: JBoss ESB
> Issue Type: Bug
> Components: Adapters
> Affects Versions: 4.12
> Reporter: Tom Cunningham
> Assignee: Tom Cunningham
>
> When used with a lot of threads, EmailRouter is throwing an exception, it looks like from a null SMTP from address.
> [1] 2014-11-13 14:59:25,620 ERROR
> [org.jboss.resource.adapter.jms.inflow.JmsServerSession] Unexpected
> error delivering message SolObjectMessage={
> JMSCorrelationID:1a7d743a-75e5-4719-aed7-825a50192c64,JMSDeliveryMode:2,JMSDestination:Queue
> 'queue/eai-email-queue',JMSExpiration:0,JMSMessageID:ID:10.210.12.618fb4149a877083b0:119130,JMSPriority:0,JMSRedelivered,JMSTimestamp:1415890730845,JMSProperties:{sendTo:EAIUATSupport@lgim.com,subject:UOI
> Mismatch from Phoenix [Realtime
> Instrument],from:u00_esb@lgim.co.uk,JMS_Solace_DeliverToOne:false,JMS_Solace_DeadMsgQueueEligible:true,JMS_Solace_ElidingEligible:false,Solace_JMS_Prop_IS_Reply_Message:false},SolPayload:{Binary
> Attachment:len=3747} }
> java.lang.NullPointerException
> at javax.mail.internet.InternetAddress.parse(InternetAddress.java:615)
> at javax.mail.internet.InternetAddress.parse(InternetAddress.java:575)
> at javax.mail.internet.InternetAddress.<init>(InternetAddress.java:107)
> at org.jboss.soa.esb.helpers.Email.addMessageAddressing(Email.java:401)
> at org.jboss.soa.esb.helpers.Email.createMailMessage(Email.java:386)
> at org.jboss.soa.esb.helpers.Email.getMailMessage(Email.java:239)
> at org.jboss.soa.esb.helpers.Email.sendMessage(Email.java:229)
> at
> org.jboss.soa.esb.actions.routing.email.Emailer.sendEmail(Emailer.java:184)
> at
> org.jboss.soa.esb.actions.routing.email.Emailer.sendEmail(Emailer.java:141)
> at
> org.jboss.soa.esb.actions.routing.email.EmailRouter.route(EmailRouter.java:78)
> at
> org.jboss.soa.esb.actions.routing.AbstractRouter.process(AbstractRouter.java:80)
> at
> org.jboss.soa.esb.actions.routing.email.EmailRouter.process(EmailRouter.java:70)
> at
> org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:667)
> at
> org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:614)
> at
> org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:442)
> at
> org.jboss.soa.esb.listeners.jca.JcaMessageAwareListener.process(JcaMessageAwareListener.java:163)
> at
> org.jboss.soa.esb.listeners.jca.JcaJMSInflowMessageProcessorAdapter.onMessage(JcaJMSInflowMessageProcessorAdapter.java:44)
> From Martin :
> Bottom line is that EmailRouter is only thread safe when used in a
> static fashion (all fields defined in jboss-esb.xml). If used
> dynamically, with the fields populated at runtime based on the message
> content, it is necessary to limit the thread count to 1 to avoid
> multi-threading issues.
> From Kevin :
> I think the problem is in the EmailRouter/Emailer classes. The EmailRouter shares the ConfigTree however the process method can also alter it depending on the message contents which is not safe. The Emailer class should be taking into account the message contents but without altering ConfigTree.
--
This message was sent by Atlassian JIRA
(v6.3.8#6338)