Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1168279 - EmailRouter/Emailer shares config
EmailRouter/Emailer shares config
Status: NEW
Product: JBoss Enterprise SOA Platform 5
Classification: JBoss
Component: JBossESB (Show other bugs)
CONTINUING
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: tcunning
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-26 10:11 EST by tcunning
Modified: 2014-11-26 10:23 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker JBESB-3976 Major Open EmailRouter/Emailer shares config 2016-08-29 05:07 EDT

  None (edit)
Description tcunning 2014-11-26 10:11:43 EST
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.

Note You need to log in before you can comment on or make changes to this bug.