Re: how best debug your own Java Class Tool Agents ?
"Pavel Cernocky, ARTIN" <[email protected]> Tue, 30 Aug 2005 09:30:04 +0200
| Newsgroups | gmane.comp.java.enhydra.shark |
|---|---|
| Message-ID | <[email protected]> |
Hi, in shark.conf there's property ToolAgentPluginDir. In that direcory you can put toolagent jars, which can be replaced without restarting shark. If you want to debug shark, I think best way is remote debugging: 1. in shark's run.bat change this line: start "Shark Server" "C:\java\j2sdk1.4.2_01\bin\java" -Xmx128M -Djava.ext.dirs=lib;lib\wrapper;lib\engine;lib\contrib; org.enhydra.shark.corba.SharkCORBAServer conf\Shark.conf to match: start "Shark Server" "C:\java\j2sdk1.4.2_01\bin\java" -Xmx128M -Xdebug -Xrunjdwp:transport=dt_socket,address=3999,suspend=n,server=y -Djava.ext.dirs=lib;lib\wrapper;lib\engine;lib\contrib; org.enhydra.shark.corba.SharkCORBAServer conf\Shark.conf 2. Import Shark to Eclipse - there was some post with detail instructions here, but it's little bit older (about half a year, but i'm not sure) 3. Create remote debug configuration: in menu: Run -> Debug... -> (Debug dialog is shown) -> choose Remote Java Application in left tree -> click button New Set appropriate project, host: localhost, port: 3999 (as in run.bat) 4. run shark with modified run.bat 5. run remote debug in Eclipse You can easily debug whole Shark including toolagents, set breakpoints, watches, everything... Hope this helps.. Palo Neville van Deventer wrote: >Hi Vojtech, > >To do this, "Singular" Testing I have a eclipse project (Eclipse 3.0), I >Have a runner that starts the shark server, executes the test, Logs the >ourputs, etc. Then shuts down after, No Mess, No fuss, and eclipse handles >the rebuilding of the wrappers, etc. > >Regards > >Neville van Deventer > >-----Original Message----- >From: Vojtech Huser [mailto:[email protected]] >Sent: 29 August 2005 11:48 PM >To: [email protected] >Subject: [shark] how best debug your own Java Class Tool Agents ? > >INTRO: >I am not so good in eclipse to be able to run shark within eclipse So I >often change my agent.class and deploy it again through a myclasses.zip file >in shark/lib directory > >I often have to close everything. restart. and then the myclasses.zip is >accesable (otherwise shark server "blocks" the file (no access >rights) > >QUESTION: >what is the best way to do tests. such as > >1. start shark >2. run one test. >3. stop shark >(re program your agent) >4. change myclasses.zip >5. run shark again >6. run second test. >...... > >is there a faster way ? (less steps) >e.g. update lib button in shark server... ? (like for processes - >versions...) > > > >P.S. >I never made my own dir with myclass.zip working. (in config) I put it to >shark/lib :-( > >Vojtech > > > > > >------------------------------------------------------------------------ > > >-- >You receive this message as a subscriber of the [email protected] mailing list. >To unsubscribe: mailto:[email protected] >For general help: mailto:[email protected]?subject=help >ObjectWeb mailing lists service home page: http://www.objectweb.org/wws > >
message-footer.txt
(text/plain, 271 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws