|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
can we create a Java Utility class and use its methods |
« View previous topic :: View next topic » |
Author |
Message
|
neha.gupta11 |
Posted: Mon May 17, 2010 11:29 pm Post subject: can we create a Java Utility class and use its methods |
|
|
Newbie
Joined: 17 May 2010 Posts: 1
|
Hi,
The problem is like I want to create a java utility class having various utility methods operating on the message and want to call these methods from different message flows using esql and java compute node.
1. Is that possible?If yes How can i do that?
2. Do I need to create a flow having a javacompute node and code the utility class in that? Or I can simply create a java utility class and deploy it in the EG? Then whats the way of calling its methods from other message flows?
3. If I create a jar file of java code and deploy it in a EG, is it true that flows which are deployed in that executiopn group can only access the code in jar file? |
|
Back to top |
|
 |
elvis_gn |
Posted: Tue May 18, 2010 12:10 am Post subject: Re: can we create a Java Utility class and use its methods |
|
|
 Padawan
Joined: 08 Oct 2004 Posts: 1905 Location: Dubai
|
Hi neha.gupta11,
neha.gupta11 wrote: |
Hi,
The problem is like I want to create a java utility class having various utility methods operating on the message and want to call these methods from different message flows using esql and java compute node.
1. Is that possible?If yes How can i do that?
2. Do I need to create a flow having a javacompute node and code the utility class in that? Or I can simply create a java utility class and deploy it in the EG? Then whats the way of calling its methods from other message flows?
3. If I create a jar file of java code and deploy it in a EG, is it true that flows which are deployed in that executiopn group can only access the code in jar file? |
Deploy the jar file in the shared-classes directory (I hope its still called the same) to make it available to anything deployed on the broker...but I believe you can only invoke static methods.
Regards.
Regards. |
|
Back to top |
|
 |
lancelotlinc |
Posted: Tue May 18, 2010 5:54 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Hi Naha,
If I can rephrase your question, I think what you are really asking is:
How does a Message Broker developer achieve economies of scale by taking advantage of common-practice Java deployment practices in the Message Broker environment?
A project that IBM provides that demonstrates exactly the deployment scenario you described is the Enterprise Exception Handler, distributed as Fix Pack ID08.
http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg24022791&loc=en_US&cs=utf-8&lang=en
If you look carefully at this project, the author uses common Java libraries in the deployed code, such as Dom4J, Jaxen, JUnit, and Log4J. It demonstrates how utility Java libraries can be deployed to the Message Broker.
One other option you might consider is creating a custom MB node in Java or C to perform some of these utilitarian operations. Just an out-of-the-box thought.
Good luck. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
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
|
|
|
|