|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Additional instances for JavaCompute Node |
« View previous topic :: View next topic » |
Author |
Message
|
upcominggeek |
Posted: Mon Apr 25, 2011 7:57 pm Post subject: Additional instances for JavaCompute Node |
|
|
 Apprentice
Joined: 21 Aug 2006 Posts: 35 Location: Boston, US
|
|
Back to top |
|
 |
mqjeff |
Posted: Tue Apr 26, 2011 1:12 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Okay, so you need to be clear on a couple of things.
One, the class that you create for a JavaCompute node is just that - a class. What the mqseries.net thread you point to mentions that at no point will broker ever instantiate more than one instance of that class - that is, it will create no more than one Java object of that class type.
This has nothing to do with how many threads running in the jvm can call methods on that class, and whether there is any coordination on the calling of those methods from those threads by the JVM.
So when you deploy a flow that has a JavaCompute node and assign multiple instances, then Broker will create one Java object, and each instance of the message flow will call the evaluate() method on that object at the appropriate time.
The infocenter link you provide has a pointer to "threading considerations for user-defined extensions". If you have concerns over whether or not your evaluate method can step on it's own toes if two threads call it at once, you should review that link. |
|
Back to top |
|
 |
upcominggeek |
Posted: Tue Apr 26, 2011 10:49 am Post subject: |
|
|
 Apprentice
Joined: 21 Aug 2006 Posts: 35 Location: Boston, US
|
Some of my java basics were brought into question as part of this confusion. But I think I am clear now.
Thanks, Jeff for the clarification. It definitely helped to put my understanding in the right perspective. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
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
|
|
|
|