aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes how trace/debug code in J2EE? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "how trace/debug code in J2EE?" Watch "how trace/debug code in J2EE?" New topic
Author

how trace/debug code in J2EE?

Paul Chen
Greenhorn

Joined: Feb 09, 2002
Posts: 8
When developing or learning, trace/debug is neccessary. In J2EE,code can' access external file directly. I try to add socket client in petstore and run in J2ee1.3,but it seems not to connect with external socket server.
assumpt we can't use remote debug, is there other way to trace/debug codes?
Thanks for any comment,
Shin Hashitani
Ranch Hand

Joined: Dec 04, 2001
Posts: 54
Hi Paul,
I am not using J2EE RI, but I think it is possible to remote debug with it. Forte has its debugging J2EE RI option. (Or is it internal server only for debugging? I am not sure.)
As far as NetBeans is conserned,
http://www.netbeans.org/articles/weblogic-remote-debug.html
This is an article describing how to remote debug WebLogic from NetBeans. I haven't tried it, but it might be a way to do it with J2EE RI.
There are some testing tools you can use.
JUnit: http://www.junit.org
cactus: http://jakarta.apache.org/cactus/
It is like you code the test cases, and those tools run unit tests against classes or containers based on the test cases. I just started using those, but I think these tools are very useful.
I could not provide you with a clear-cut answer to your problem, but I hope this info will be a starting point for the solution.
I'll post more if I find something.
If you find out how,
please post it here.
I am interested, too.

Shin Hashitani


/*<br /> * Quants Inc.<br /> * Engineer<br /> *<br /> * Shin Hashitani<br /> * hashitani@quants.co.jp<br /> * <a href="http://www.quants.co.jp" target="_blank" rel="nofollow">www.quants.co.jp</a><br />*/
Paul Chen
Greenhorn

Joined: Feb 09, 2002
Posts: 8
Thanks Shin,
Though we can have remote debug and test tools to debug J2EE application, it is not convenient. Remote debug should assumpt server and ide both have remote debug funtions. Otherwise, no way.
J2SE 1.4 has improve Logging API. But I am not sure if J2EE can get any benifit from it.
Paul
Tom Stevns
Ranch Hand

Joined: Nov 20, 2001
Posts: 120
Hi Paul !
Try VA-JAVA's Websphere test environment(WTE) at version 3.5 level.
There is also remote debugging facility
Don't miss the redbooks if you attend to use
WTE and the remote deugging.


Regards Tom Stevns, SCJP2
Sam Dalton
Author
Ranch Hand

Joined: Jul 26, 2001
Posts: 170
Try using the Apache Log4J framwork. This provides flexible debug and log information to a nubmer of sources (files, sockets, JMS etc).
It is avaliable on jakarta.apache.org/log4j


<a href="http://www.samjdalton.com" target="_blank" rel="nofollow">Sam Dalton</a>,<br />Co-author of [http://www.amazon.com/exec/obidos/tg/detail/-/1590592255/qid=1068633302//ref=sr_8_xs_ap_i0_xgl14/104-4904002-9274339?v=glance&s=books&n=507846]Professional JSP 2.0[/URL] (October 2003)<br />Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/1861007701/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional SCWCD Certification</a><br />Co-author of <a href="http://www.amazon.com/exec/obidos/ASIN/186100561X/ref=ase_electricporkchop" target="_blank" rel="nofollow">Professional Java Servlets 2.3</a>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how trace/debug code in J2EE?