|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
delpoying Javacompute node which referenced to different jar |
« View previous topic :: View next topic » |
Author |
Message
|
akhnukh |
Posted: Thu Oct 16, 2008 12:47 pm Post subject: delpoying Javacompute node which referenced to different jar |
|
|
Newbie
Joined: 16 Oct 2008 Posts: 9
|
Hi,
I am working with Java Compute node in Message broker. I am facing few problem in using it . Can anyone of you explain me reason why its happening.
Here is my Java compute evalute() method flow. Let say Java Compute Node logic is in
package mypackage;
import org.appache.logger.log4j;
import myapplicationjar.myapplicationpackage.CustomClass;
+ all required imports for java compute node.
... evalaute()
{
try{
1.
2. Manuplating input data using custom class which is written in same package mypackage.
. a
. b
. c
3. Creating log4j logger object and using it for logging which is bundled in log4j jar and in project build path as library..
. a
. b
. c
4. creating an object of CustomClass which is bundled in myapplication jar and in project build path as library.
. a
. b
. c
}
catch(MBException Mbex){
}
catch(Exception ex){
}
}
. a
. b this show next statments using object created above them.
. c
When I try to delpoy and test my message flow in message broker using message broker toolkit. I have facing quiet strange problems.
my flow is deployed in message broker as a bar file , in which Java project is bundled as jar. Inside java project jar i have Javacompute node classes and 3rd party log4j jar and mycustomapplication jar.
Stat- 1. working fine compute node flow jumps to next statement
Stat- 2. it uses classes written in same package and work perfectly and flow went down.
Stat- 3. working fine i am using log4j and its deployed in message broker as jar.
Stat- 5. when i use mycustom jar Class object. node flow suddenly went out through failure node. even i didnt catch any excpetion as its configured there.
My application is using other libraries like spring, hibernate etc. why it didnt catch in exception block. And what is best way to deploy bar with differnt jar files. |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Oct 16, 2008 2:33 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Message Broker is not a Java application server, please don't treat it like one.
Are you sure you should really be using all of that functionality in Spring and Hibernate and etc, instead of using the Broker native functionality instead?
There is information on classloading and classpaths in the Broker Info Center. These will likely answer all of your questions about how to do what you are trying to do - which as I say, may not be what you should be doing. |
|
Back to top |
|
 |
akhnukh |
Posted: Fri Oct 17, 2008 11:09 am Post subject: |
|
|
Newbie
Joined: 16 Oct 2008 Posts: 9
|
Thanks.
Well i m using hibernate, Spring. Actually I am reterving information from DB using using Hibernate and Spring framework.
All my Spring and Hibernate logic along with mylogic is bundled in that jar.
My problem resolved by putting all jar files shared-classes. Actually mycustom jar has some dependency on other jars like , spring, hibernate, log4j, oracle_jar .... etc. So i place all my jars in shared classes and then deploy my flow it works.
Few thing which i have noticed here that my statements are under try/catch and finally block. During problem when computation flow comes to statement where i am calling jar classes. Control suddenly jumps to finally block and then went out of node. Infact it should raise some exception and should be caught by catch Exception block . i dont know why it is happening.
Another thing whcih i have notice that when my bar size is more then 4 MB. and i tried to delpoy it using broker toolkit it didnt deploy. I have seen on internet that i should increase channel size of queue manager. But when i open my default queue manger using MQ explorer i cant see channel information over there. |
|
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
|
|
|
|