History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LINGO-6
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Justin Rowe
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Lingo

marshaller in JmsServiceExporter uninitialized due to multi-threading (experienced on Websphere MQ 5.3)

Created: 02/Sep/05 09:00 AM   Updated: 26/Oct/05 06:47 AM
Component/s: None
Affects Version/s: 1.0-M1
Fix Version/s: 1.0

Time Tracking:
Not Specified

Environment: Websphere MQ 5.3, connectionFactory = com.ibm.mq.jms.MQQueueConnectionFactory; transportType = 1 (TCP/IP, thin java-only client)


 Description  « Hide
In JmsServiceExporter, following code means that JMSServiceExporter.onMessage can be called in another thread before super.afterProperties initializes the marshaller, leading to "MQJMS1034E MessageListener threw: java.lang.NullPointerException" error

...
// do we have a destination specified, if so consume
if (destination != null) { Session session = producer.getSession(); consumer = session.createConsumer(destination); consumer.setMessageListener(this); }

super.afterPropertiesSet();
}

Possible solution may be to call super.afterPropertiesSet() before calling consumer.setMessageListener(this), this seems to be where the thread is being created by Websphere MQ implementation



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
james strachan - 26/Oct/05 06:47 AM
Thanks for spotting this - we ensure we call super.afterPropertiesSet() before starting the consumer