Author |
Message
|
Shuyin |
Posted: Thu Nov 01, 2012 10:25 am Post subject: issues with java and WMB v7.0.0.3 |
|
|
Novice
Joined: 26 Jul 2012 Posts: 23
|
Hi EveryBody!
Thank you for all your help with previous problems. I've a trouble with WMB v7 and a java compute node. The problem is as follow:
I have a flow with this structure: timeoutnotification->JavaComputeNode->Compute
In the timeoutnotification node i put 10 seconds as interval,
in the javacomputenode i have code for retrieve email with javamail API
and in the compute node i have code for insert the email information in a DB.
i deploy the flow succesfully but it starts using JVM memory incrementally until this throws an outofmemory error. And the DataFlowEngine process uses a lot of CPU.
i check the code but there is no problem with it.
What do you think could be the problem? |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Nov 01, 2012 10:36 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
The first problem is that you're not using the EmailInput node...
The problem with memory is very likely how you have coded the JCN to deal with the message objects that you create. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 01, 2012 10:47 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
This is effectively the same problem as you described here. Something is wrong with the way you're handling the message objects.
As stated in the earlier thread there is no advantage to using javamail when you have the inbuilt nodes available. There is however that you're inventing a wheel IBM have supplied. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Shuyin |
Posted: Thu Nov 01, 2012 10:49 am Post subject: |
|
|
Novice
Joined: 26 Jul 2012 Posts: 23
|
mqjeff wrote: |
The first problem is that you're not using the EmailInput node...
The problem with memory is very likely how you have coded the JCN to deal with the message objects that you create. |
Hi mqjeff!
The problem with the EmailInput node in v7.0.0.3 is this can't retrieve a message with attachments and html body. So we have to improve java code.
Do you think the problem is in creation of the message? |
|
Back to top |
|
 |
mqjeff |
Posted: Thu Nov 01, 2012 10:54 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Shuyin wrote: |
The problem with the EmailInput node in v7.0.0.3 is this can't retrieve a message with attachments and html body. So we have to improve java code. |
The EmailInput node in 7.0.0.3 should be able to retrieve any valid legal MIME document.
Shuyin wrote: |
Do you think the problem is in creation of the message? |
Usually a JCN that leaks memory is doing the wrong things in terms of creating MBMessages or the wrong thing in terms of cleaning them up.
But you haven't, of course, shown that you've done any troubleshooting to clear up where the memory is leaking. |
|
Back to top |
|
 |
Shuyin |
Posted: Thu Nov 01, 2012 10:56 am Post subject: |
|
|
Novice
Joined: 26 Jul 2012 Posts: 23
|
Vitor wrote: |
This is effectively the same problem as you described here. Something is wrong with the way you're handling the message objects.
As stated in the earlier thread there is no advantage to using javamail when you have the inbuilt nodes available. There is however that you're inventing a wheel IBM have supplied. |
Vitor,
The problem in previous topic is different than this one. The first problem was fixed handling a two biytearrays. In this case the problem is a extended use of cpu. |
|
Back to top |
|
 |
Shuyin |
Posted: Thu Nov 01, 2012 11:01 am Post subject: |
|
|
Novice
Joined: 26 Jul 2012 Posts: 23
|
mqjeff wrote: |
Shuyin wrote: |
The problem with the EmailInput node in v7.0.0.3 is this can't retrieve a message with attachments and html body. So we have to improve java code. |
The EmailInput node in 7.0.0.3 should be able to retrieve any valid legal MIME document.
Shuyin wrote: |
Do you think the problem is in creation of the message? |
Usually a JCN that leaks memory is doing the wrong things in terms of creating MBMessages or the wrong thing in terms of cleaning them up.
But you haven't, of course, shown that you've done any troubleshooting to clear up where the memory is leaking. |
Thanks for your reply mqjeff, in the v7.0.0.4 the problem is fixed. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 01, 2012 11:04 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Shuyin wrote: |
The problem in previous topic is different than this one. |
Not essentially
Shuyin wrote: |
The first problem was fixed handling a two biytearrays. |
Was the problem fixed, masked or moved. It's still incorrect handling of the message objects.
Shuyin wrote: |
In this case the problem is a extended use of cpu. |
No, the problem is that the execution group is being run out of memory by your code. Burning memory requires code, code requires cpu. It's still a problem with your code, a problem which could be significantly reduced or eliminated by removing the unnecessary javamail function. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Thu Nov 01, 2012 11:06 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Shuyin wrote: |
Thanks for your reply mqjeff, in the v7.0.0.4 the problem is fixed. |
Which problem? The problem with your code, or the problem with the EmailInput node which caused you to write your own code?
Future readers may be interested to know. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Shuyin |
Posted: Thu Nov 01, 2012 12:40 pm Post subject: |
|
|
Novice
Joined: 26 Jul 2012 Posts: 23
|
Vitor wrote: |
Shuyin wrote: |
Thanks for your reply mqjeff, in the v7.0.0.4 the problem is fixed. |
Which problem? The problem with your code, or the problem with the EmailInput node which caused you to write your own code?
Future readers may be interested to know. |
The problem with the EmailInput Node. |
|
Back to top |
|
 |
Shuyin |
Posted: Thu Nov 01, 2012 12:45 pm Post subject: |
|
|
Novice
Joined: 26 Jul 2012 Posts: 23
|
Vitor wrote: |
Shuyin wrote: |
The problem in previous topic is different than this one. |
Not essentially
Shuyin wrote: |
The first problem was fixed handling a two biytearrays. |
Was the problem fixed, masked or moved. It's still incorrect handling of the message objects.
Shuyin wrote: |
In this case the problem is a extended use of cpu. |
No, the problem is that the execution group is being run out of memory by your code. Burning memory requires code, code requires cpu. It's still a problem with your code, a problem which could be significantly reduced or eliminated by removing the unnecessary javamail function. |
The first problem was fixed. And about the handling of the message objects, i have used the clearmessage method, is this a way to resolve?
So what could be the unnecessary javamail function?
thanks for your help |
|
Back to top |
|
 |
rekarm01 |
Posted: Fri Nov 02, 2012 12:45 am Post subject: Re: issues with java and WMB v7.0.0.3 |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
Shuyin wrote: |
i check the code but there is no problem with it. |
Without seeing the code, there's no way to confirm that, is there? The JCN could be leaking memory due to failure to clean up non-MB objects as well.
If whatever problems in the EmailInput node was fixed in 7.0.0.4, does that mean there's no more need for a JCN? |
|
Back to top |
|
 |
Shuyin |
Posted: Mon Nov 05, 2012 5:53 pm Post subject: Re: issues with java and WMB v7.0.0.3 |
|
|
Novice
Joined: 26 Jul 2012 Posts: 23
|
rekarm01 wrote: |
Shuyin wrote: |
i check the code but there is no problem with it. |
Without seeing the code, there's no way to confirm that, is there? The JCN could be leaking memory due to failure to clean up non-MB objects as well.
If whatever problems in the EmailInput node was fixed in 7.0.0.4, does that mean there's no more need for a JCN? |
Hi rekarm01!!
I use the clearmessage method, but it still "eating" memory and CPU. Is there any other way to clean the objects?
And about the 7.0.0.4 fix, i can't use this node because i want to save the Mime tree of the mail in a database using blob data.
Thanks for your reply! |
|
Back to top |
|
 |
fjb_saper |
Posted: Mon Nov 05, 2012 11:15 pm Post subject: Re: issues with java and WMB v7.0.0.3 |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Shuyin wrote: |
And about the 7.0.0.4 fix, i can't use this node because i want to save the Mime tree of the mail in a database using blob data.
Thanks for your reply! |
This is a very very strange statement, as one has absolutely nothing to do with the other. You're just showing how little you understand about Broker and the way java works in the broker.
Get some training!  _________________ MQ & Broker admin |
|
Back to top |
|
 |
Shuyin |
Posted: Tue Nov 06, 2012 9:53 am Post subject: Re: issues with java and WMB v7.0.0.3 |
|
|
Novice
Joined: 26 Jul 2012 Posts: 23
|
fjb_saper wrote: |
Shuyin wrote: |
And about the 7.0.0.4 fix, i can't use this node because i want to save the Mime tree of the mail in a database using blob data.
Thanks for your reply! |
This is a very very strange statement, as one has absolutely nothing to do with the other. You're just showing how little you understand about Broker and the way java works in the broker.
Get some training!  |
mmm ok, your opinion is very helpful!! and what could i read just for understand about java-broker? |
|
Back to top |
|
 |
|