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 » how can i debug java node

Post new topic  Reply to topic
 how can i debug java node « View previous topic :: View next topic » 
Author Message
reachguna
PostPosted: Fri Oct 11, 2002 7:55 am    Post subject: how can i debug java node Reply with quote

Newbie

Joined: 10 Oct 2002
Posts: 5

Hi ,

How can i debug the java node deployed into the broker?
Anybody has thoughts how to do?

Thanks,
Chandra
Back to top
View user's profile Send private message
marko
PostPosted: Fri Oct 11, 2002 8:43 am    Post subject: Reply with quote

Apprentice

Joined: 28 Feb 2002
Posts: 27

Tracing to a log file has worked well for me.
Back to top
View user's profile Send private message
reachguna
PostPosted: Fri Oct 11, 2002 9:13 am    Post subject: Reply with quote

Newbie

Joined: 10 Oct 2002
Posts: 5

Hi,

Thanks for your reply. Can you explain with more details.

Regds,
Chandra.
Back to top
View user's profile Send private message
marko
PostPosted: Fri Oct 11, 2002 11:25 am    Post subject: Reply with quote

Apprentice

Joined: 28 Feb 2002
Posts: 27

Basically append to a file on your local filesystem, then print trace statements to the file. You can then examine the file to see what happened in your plugin.

I have not tried it, but it may also be possible to configure WMQI so that you can attach a remote debugger to your code. But personally I prefer tracing, especially as a post-mortum mechanism to analyse a failure in a running system (like your production system).

Here is some code that may help.

Code:


   if ( msg == null )
   {
      throw new NullPointerException( "Trace message is null.'" );
   }


   if ( traceFile == null )
   {
      traceFile = new FileOutputStream( "trace.log", true );
   }

   // reset the traceByteBuffer.
   traceByteBuffer.reset();

   // maximize buffering.
   final boolean autoFlush = false;

   PrintWriter msgWriter = new PrintWriter( traceByteBuffer, autoFlush );


   msgWriter.println( "some header text..." );

   msgWriter.println( msg );

   msgWriter.println( "some footer text..." );


   msgWriter.flush();
   msgWriter.close();

   //
   // if tracing is performed in parallel to the same trace file,
   // which can occur with multiple flow instances or exec groups,
   // then we need to flush the trace entry atomically to avoid interleaving of
   // seperate log entries.

   traceByteBuffer.writeTo( traceFile );

   traceFile.flush();
Back to top
View user's profile Send private message
mmarq
PostPosted: Fri Oct 11, 2002 12:50 pm    Post subject: how to debug a java node Reply with quote

Acolyte

Joined: 19 Sep 2002
Posts: 74
Location: Newton, MA

Hi there,

In the new "Developing Solutions in Websphere MQ Integrator" redbook - it talks about the use of JDB which is a java debugger that comes w/Java.
You can reference the document for Java Debugging here:
www.ibm.com/developerWorks.


Chapt 7 - Section 7.5.2 of the redbook I mentioned above goes through an example of how to debug a node using jdb.

Good luck!
Melissa
_________________
M Marquis
Back to top
View user's profile Send private message Visit poster's website AIM Address
lillo
PostPosted: Sat Oct 12, 2002 4:35 am    Post subject: Reply with quote

Master

Joined: 11 Sep 2001
Posts: 224

Also chapter 7 will show you how to debug java nodes using WebSphere Application Developer.

Cheers,
_________________
Lillo
IBM Certified Specialist - WebSphere MQ
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 » how can i debug java node
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.