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 » Debugging Java code in JavaComputeNode

Post new topic  Reply to topic
 Debugging Java code in JavaComputeNode « View previous topic :: View next topic » 
Author Message
jainprav
PostPosted: Tue Jan 31, 2012 2:11 am    Post subject: Debugging Java code in JavaComputeNode Reply with quote

Novice

Joined: 29 Oct 2008
Posts: 10

Generally, when I run debugger on my Java code (written in JavaComputeNode and deployed on the broker) I can make a change to my code and click save, and the current debug session will pick up my code changes (assuming "Build Automatically" is turned on). For some reason this has stopped working and the debugger ignores my changes.

Is there something that can be enabled or fixed?

Regards,
jainprav
Back to top
View user's profile Send private message
mqsiuser
PostPosted: Tue Jan 31, 2012 2:27 am    Post subject: Re: Debugging Java code in JavaComputeNode Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

jainprav wrote:
assuming "Build Automatically" is turned on


You expect edit&continue(debugging). I guess that this is not possible. Build automatically only does some lokal linking... even if it would try to deploy, deploying will halt until the current processing finishes.

jainprav wrote:
For some reason this has stopped working and the debugger ignores my changes.


Stopped working... I guess it never worked ?!
_________________
Just use REFERENCEs
Back to top
View user's profile Send private message
jainprav
PostPosted: Tue Jan 31, 2012 3:14 am    Post subject: Re: Debugging Java code in JavaComputeNode Reply with quote

Novice

Joined: 29 Oct 2008
Posts: 10

mqsiuser wrote:
jainprav wrote:
assuming "Build Automatically" is turned on


You expect edit&continue(debugging).Yes, edit the deployed java code, save, and continue debugging.
I guess that this is not possible. Yes, it is very much possible, and I am doing it for last 3 years. It works only for java code, but not for messge flow. Also, it works only for the same debug session. If you close the debug session and re-run it, the code will not take up the changes.

Build automatically only does some lokal linking... even if it would try to deploy, the code will not be replaced until the current processing finished.
Agreed, saving the changes in java code will not result in new code being deployed to the broker. That's the reason killing the debug session will not take the changed java code.

jainprav wrote:
For some reason this has stopped working and the debugger ignores my changes.


Stopped working... I guess it never worked ?!
It very well works, but suddenly stopped working on one of my team members m/c.[/quote]
Back to top
View user's profile Send private message
mqsiuser
PostPosted: Tue Jan 31, 2012 4:47 am    Post subject: Re: Debugging Java code in JavaComputeNode Reply with quote

Yatiri

Joined: 15 Apr 2008
Posts: 637
Location: Germany

jainprav wrote:
Yes, edit the deployed java code, save, and continue debugging. [...] Yes, it is very much possible, and I am doing it for last 3 years. It works only for java code, but not for messge flow. Also, it works only for the same debug session. If you close the debug session and re-run it, the code will not take up the changes.

mqsiuser wrote:
Build automatically only does some lokal linking... even if it would try to deploy, the code will not be replaced until the current processing finished.

Agreed, saving the changes in java code will not result in new code being deployed to the broker.


When you edit ESQL you can continue debugging (displays the new code, but debugs the old code). I cannot imagine that the (changed) Java code gets picked up (without a deployment). Who uses Java (on Broker) and can confirm/dismiss this ?
_________________
Just use REFERENCEs
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Tue Jan 31, 2012 5:55 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

Deployment is required. The OP is mistaken. Toolkit has never supported on-the-fly code changes, for Java or ESQL.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
jainprav
PostPosted: Tue Jan 31, 2012 8:14 pm    Post subject: Reply with quote

Novice

Joined: 29 Oct 2008
Posts: 10

[quote="lancelotlinc"]Deployment is required. The OP is mistaken. Toolkit has never supported on-the-fly code changes, for Java or ESQL.[/quote]

Deployment of the changed java code is not required if the debug session is turned on and you make the changes in java code and save it (assuming 'build automatically' is turned on).
When you save the changed java code while in debug mode, the control of the debug moves to the first statement of that java file. Now when the control comes back to the changed java code, it is taken up.

This works may be because the new compiled java file is present somewhere in the memory of JVM of the broker/Execution group, though not sure.

We have been doing it for years and it still works, but has suddenly stopped on one of my team members m/c.

This is a very helpful feature that toolkit (v 6.1.0.x) provides for the testing purpose.

Yes, deployment is required only if one stops the debugger and then save the changes. For the changes to be permanently applicable, one has to deploy the new bar file to the broker.
Back to top
View user's profile Send private message
kash3338
PostPosted: Tue Jan 31, 2012 8:30 pm    Post subject: Reply with quote

Shaman

Joined: 08 Feb 2009
Posts: 709
Location: Chennai, India

I guess you are talking about the feture "Hotswap Bug Fixing: On-the-fly code fixing" in Eclipse, which allows the changes to be done on-the-fly while debugging.

The feture is supported in eclipse,
http://www.ibm.com/developerworks/library/os-ecbug/

This feture works only with JVM1.4 and above, may be you can check the JVM version on your system.
Back to top
View user's profile Send private message Send e-mail
jainprav
PostPosted: Tue Jan 31, 2012 9:12 pm    Post subject: Reply with quote

Novice

Joined: 29 Oct 2008
Posts: 10

[quote="kash3338"]I guess you are talking about the feture "Hotswap Bug Fixing: On-the-fly code fixing" in Eclipse, which allows the changes to be done on-the-fly while debugging.

The feture is supported in eclipse,
http://www.ibm.com/developerworks/library/os-ecbug/

This feture works only with JVM1.4 and above, may be you can check the JVM version on your system.[/quote]

[quote="jainprav"] Thanks Kash3338, that's what I was talking about. I check the link but somehow it's nowhere mentioned how to enable this feature if it got disabled or stopped working suddenly. [/quote]
Back to top
View user's profile Send private message
lancelotlinc
PostPosted: Wed Feb 01, 2012 6:52 am    Post subject: Reply with quote

Jedi Knight

Joined: 22 Mar 2010
Posts: 4941
Location: Bloomington, IL USA

The JVM running your Bar file is not the same instance as the JVM running inside Eclipse. You may be confusing standard Java code in Jars running in the Eclipse JVM rather than Bar file running on a runtime.

You cannot run bar files directly from Eclipse and therefore cannot change Java code on the fly.
_________________
http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Debugging Java code in JavaComputeNode
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.