ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » is Java Compute Node Thread Safe

Post new topic  Reply to topic
 is Java Compute Node Thread Safe « View previous topic :: View next topic » 
Author Message
wyatt
PostPosted: Wed Jul 02, 2008 5:33 am    Post subject: is Java Compute Node Thread Safe Reply with quote

Voyager

Joined: 28 Nov 2004
Posts: 76

When adding additional msgflow instances on WMB AIX 6.1, the IPROCS indicator matches the number of instances specified in the bar file and we can see that multiple threads are running in the java compute node by printing out the thread-id unfortunately we keep getting core files and unpredictable results

Do people use the java compute node in high volume production systems. Is this practical.

The info center has this statement
"Only one instance of the JavaCompute node is created regardless of the number of threads running against the flow (either as a result of additional instances or multiple input nodes)." Does this mean that java compute nodes are synchronized?

Please share your experiences re: java compute node - should we persue this approach or stay with ESQL
Back to top
View user's profile Send private message
Esa
PostPosted: Thu Jul 03, 2008 12:28 am    Post subject: Reply with quote

Grand Master

Joined: 22 May 2008
Posts: 1387
Location: Finland

The evaluate method is definetely not synchronized, otherwise there would be only one thread running it at a time. You could not scale the flow by allowing more instances. If you need to access common resources or do something else in a sychronized manner, you must take care of sychronization yourself. Make sure you sychronize the absolute minimum of code to avoid creating a bottleneck. The JVM will allow only one thread at a time to run the synchronized block.
Back to top
View user's profile Send private message
wyatt
PostPosted: Thu Jul 03, 2008 6:42 pm    Post subject: Reply with quote

Voyager

Joined: 28 Nov 2004
Posts: 76

Thanks.

...confirmed your assertion by printing out Thread.currentThread().getname(). The thread id displayed matches the number of instances specified. So if I have three threads, three separate thread ids are displayed in the log
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » is Java Compute Node Thread Safe
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.