ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dushyant Shrivastava" <dus...@yambay.com>
Subject RE: [JBoss-user] Starting JBoss from ANT
Date Wed, 02 Oct 2002 01:48:45 GMT
Hi James,
Thanks a lot for the prompt reply. A couple of questions regarding your suggestion

1. is spawn a custom defined task?? I haven't come across an Ant specific task known as "spawn"
2. What exactly do u mean when u say "it releases the blocking after its initial startup but
before deployment
has occurred", deployment of what?? Are u referring to our own ejb's?
3. I am assuming that you are running JUnit in the same VM as JBoss? So am i thinking right
when i say you wait till u see this message "Kernel started" or whatever and then execute
JUnit from within the same build.xml???

Thanks once again for ur help

Dushy

-----Original Message-----
From: James Higginbotham [mailto:jhigginbotham@betweenmarkets.com]
Sent: Tuesday, October 01, 2002 9:41 PM
To: jboss-user@lists.sourceforge.net; ant-user@jakarta.apache.org
Subject: RE: [JBoss-user] Starting JBoss from ANT


Right.. What we did was spawn the jboss process, then create an internal
custom ant tag to watch the jboss log for the microkernel started (since
it releases the blocking after its initial startup but before deployment
has occurred. Once the log says that things are ok, we then launch
junit. Here is a snippt of what we did, but you may have to do your own
log watcher or similiar check, as I can't release the code (sorry). 
 
  <spawn executable="${bmiRoot}/BuildTools/apache/ant/bin/ant.bat">
   <arg line="-buildfile ${processAntFile}"/>
   <arg line="java.start.jboss"/>
  </spawn>
  <WatchLog filename="${jboss.home}/server/default/log/server.log"
pattern="Started in" lines="5" timeout="360"/>
  <echo message="JBoss is up."/>

James

	-----Original Message-----
	From: Dushyant Shrivastava [mailto:dushys@yambay.com] 
	Sent: Monday, September 30, 2002 11:01 PM
	To: ant-user@jakarta.apache.org
	Cc: jboss-user@lists.sourceforge.net
	Subject: [JBoss-user] Starting JBoss from ANT
	
	


	Hi, 
	I had posted a message earlier about running JUnit tests inside
the same VM as JBoss so as to enable the testing of local interfaces and
I did get a few responses back. Thanks everyone!

	Now one of the most common response was to start Jboss
environment from within my tests.Hence i started by adding the following
lines in my build.xml to start JBoss server

	. 
	   <!--
=================================================================== --> 
	   <!-- Starts up JBoss
--> 
	   <!--
=================================================================== --> 
	   
	     <target name="runjboss" depends="init"> 
	          <exec dir = "${jboss.home}/bin" 
	         executable = "${jboss.home}/bin/run.bat" 
	           os = "Windows 2000"> 
	          </exec>    
	    </target> 

	However, now it starts JBoss but then does not execute any tasks
after this one as JBoss just holds on to the VM. Exec task does not
support the FORK option either, but in any case I do not wish to use the
fork option as it will beat the whole purpose of running the tests
inside the same JVM as JBoss. Does anyone has any idea how to get around
this problem?

	P.S I know Cactus is one of the way out but at the moment, my
project team is not too keen on trialling out another new tool and Junit
would be the easiest way for our implementation.

	In short I would apprecate if anyone has already done this and
could give me specific directions or advise me on how to run the JUnit
tests inside the same VM as JBoss so that I can test my local interfaces
as well!

	Also attached is my build.xml file for anyone who wants to
investigate this further, 

	Thanks a lot in advance, 

	Cheers 
	Dushy 
	______________________
	DUSHYANT SHRIVASTAVA
	Software Engineer
	
	YAMBAY
	
	tel      +61 (0) 8 9323 6999
	mob  +61 (0) 402 902 652
	fax     +61 (0) 8 9325 2688
	web   www.yambay.com 
	
	Yambay Technologies Pty Ltd
	7th Floor, The Victoria, 14-16 Victoria Ave, Perth. WA, 6000,
Australia
	
________________________________________________________________________
_________________________
	
	This message and any files transmitted with it are confidential
and are intended solely for the use of those persons to
	whom the message is addressed. If you have received this message
in error, please destroy and delete this
	message from your computer. Any unauthorised form of
reproduction of this message or any files transmitted with
	it is strictly prohibited. yambay does not make any warranty
concerning the security of any information electronically
	transmitted and disclaims all liability for the proper and
complete transmission of any information contained or purportedly
	contained in this message, nor for any delay in its receipt. If
you receive this message in error please notify the sender.
	
________________________________________________________________________
_________________________ 
	<<build.xml>> 


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message