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 » Calling a static Method in a JAR file

Post new topic  Reply to topic
 Calling a static Method in a JAR file « View previous topic :: View next topic » 
Author Message
j_syed
PostPosted: Thu Oct 01, 2009 9:04 pm    Post subject: Calling a static Method in a JAR file Reply with quote

Newbie

Joined: 01 Oct 2009
Posts: 1

Does anyone see a problem in calling a static method in a JAR file from a compute node. The JAR method posts a message into a JMS queue and then waits on another queue for the reply based on a correlation ID. I know there is a JMSQueue node in WMB but I am interested to know if there is a problem doing the logic in a Java JAR file. Please advise.
Back to top
View user's profile Send private message
Vitor
PostPosted: Fri Oct 02, 2009 7:17 am    Post subject: Re: Calling a static Method in a JAR file Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

j_syed wrote:
I know there is a JMSQueue node in WMB but I am interested to know if there is a problem doing the logic in a Java JAR file. Please advise.


As a new poster, I'll warn you my Java is a bit dubious, so bear that in mind.

Problems I can see:

- you're reinventing the wheel; why not let WMB manage this? It's why you're paying the license fee for the software
- you could have problems if there are multiple threads running. Remember that WMB doesn't run in a JVM and spins up one for the compute node
- how does this method integrate with WMB's transactional control?
- how does this method signal WMB that a reply has not bee received, so that the flow can respond accordingly?

There may be other problems; not all of these may be problems.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri Oct 02, 2009 7:38 am    Post subject: Re: Calling a static Method in a JAR file Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Vitor wrote:
- you could have problems if there are multiple threads running. Remember that WMB doesn't run in a JVM and spins up one for the compute node


No, that's not true.

Large portions of WMB these days are written in Java in the first place. Every EG is both a C++ Runtime and a JVM.

You certainly *can* use JMS from a JavaCompute node or from a static method called from a compute node.

But all of the rest of Vitor's responses do apply for why you shouldn't do this. The only reasonable cause for doing so is if you need to Get a message from a JMS queue in the middle of a flow - as there is not currently a JMSGet node.
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 » Calling a static Method in a JAR file
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.