Hi,

I tryed posting this message earlier...if it's a duplicate, I apologize.

I'm currently trying to create an Ant task which in my script file, stops the
Tomcat instance I have running, does something else(runs some HttpUnit tests,
performing some inserts into a database), and then brings Tomcat back up, after
which, the script continues.  It's actually being run by CruiseControl, at
regular time intervals.  My first attempt at this was a calling a batch file;
that was slow and more importantly, hung my script file.  Then I put a task
together based on some code I found while searhing through the archives.   This
uses the Java task and forks so I thought it would run Tomcat in a thread so my
script would continue.  Here's the code snippet(thanks to the person who
actually created this task):
<property name="tomcat.home" value="<my tomcat home dir>"/>
<target name="bootStrapTomcatStart" description="calls
org.apache.catalina.startup.Bootstrap">
     <java classname="org.apache.catalina.startup.Bootstrap" fork="yes"
failonerror="false">
          <arg value="start" />
          <sysproperty key="catalina.base" value="${tomcat.home}" />
          <sysproperty key="catalina.home" value="${tomcat.home}" />
                      <classpath>
               <pathelement location="${tomcat.home}/bin/bootstrap.jar"/>
               <pathelement path="${tomcat.home}/bin"/>
               <pathelement path="${tomcat.home}/lib"/>
          </classpath>
      </java>
</target>

Now this starts tomcat up, but also freezes my script, which I thought the fork
would alleviate.  I was thinking of somehow putting this
task in it's own xml file and trying to use the antcall task to refer to the
file with the hope of not hanging the calling script, but it's a leap
of faith...
Does anyone have any ideas how to bounce tomcat, without the hanging side
effect?
I'm sort of hung, so any ideas would be greatly appreciated...thanks...peter




This e-mail, including attachments, may include confidential and/or 
proprietary information, and may be used only by the person or entity to 
which it is addressed. If the reader of this e-mail is not the intended 
recipient or his or her authorized agent, the reader is hereby notified 
that any dissemination, distribution or copying of this e-mail is 
prohibited. If you have received this e-mail in error, please notify the 
sender by replying to this message and delete this e-mail immediately.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to