You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-dev@ws.apache.org by feilong <fe...@dfki.de> on 2005/07/08 16:30:01 UTC

How to creating concurrent call in batch file

Hallo,
I want to write a batch file under windows to call 6 instances concurrently to test whether the program is thread-safe. Below is the shell script for linux to create parallel call, it works. But if I use the same syntax, i.e. "&" to connect "java" call in batch file under windows, it only creates serial call, not concurrent call. 
How can I write a windows script or a batch file under windows to build parallel call.

Best Regards
saarxfk


parallelCall.sh
------------------------------------------------------------------------------------------------
# set the classpath
export CLASSPATH=
for i in jars/*jar; do export CLASSPATH=$CLASSPATH:$i; done

java WinsServiceClient morganti.pdf morganti.pdf it &
java WinsServiceClient alesi.pdf alesi.pdf it &
java WinsServiceClient morganti2.pdf morganti2.pdf it &
java WinsServiceClient alesi2.pdf alesi2.pdf it &
java WinsServiceClient morganti3.pdf morganti3.pdf it &
java WinsServiceClient alesi3.pdf alesi3.pdf it
------------------------------------------------------------------------------------------------

Best Regards
Feilong

Re: How to creating concurrent call in batch file

Posted by Scott Nichol <sn...@scottnichol.com>.
In case it is not clear, what he means is

start java WinsServiceClient morganti.pdf morganti.pdf it
start java WinsServiceClient alesi.pdf alesi.pdf it
start java WinsServiceClient morganti2.pdf morganti2.pdf it
start java WinsServiceClient alesi2.pdf alesi2.pdf it
start java WinsServiceClient morganti3.pdf morganti3.pdf it
start java WinsServiceClient alesi3.pdf alesi3.pdf it

The "start" command launches a new window in which to run the command.

Scott Nichol

Do not send e-mail directly to this e-mail address,
because it is filtered to accept only mail from
specific mail lists.
----- Original Message ----- 
From: "Felipe Palma Dias" <pa...@yahoo.com.br>
To: <so...@ws.apache.org>
Sent: Friday, July 08, 2005 10:54 AM
Subject: Re: How to creating concurrent call in batch file


> Try
> 
> start java ...
> 
> 
> --- feilong <fe...@dfki.de> escreveu:
> 
> > Hallo,
> > I want to write a batch file under windows to call 6
> > instances concurrently to test whether the program
> > is thread-safe. Below is the shell script for linux
> > to create parallel call, it works. But if I use the
> > same syntax, i.e. "&" to connect "java" call in
> > batch file under windows, it only creates serial
> > call, not concurrent call. 
> > How can I write a windows script or a batch file
> > under windows to build parallel call.
> > 
> > Best Regards
> > saarxfk
> > 
> > 
> > parallelCall.sh
> >
> ------------------------------------------------------------------------------------------------
> > # set the classpath
> > export CLASSPATH=
> > for i in jars/*jar; do export
> > CLASSPATH=$CLASSPATH:$i; done
> > 
> > java WinsServiceClient morganti.pdf morganti.pdf it
> > &
> > java WinsServiceClient alesi.pdf alesi.pdf it &
> > java WinsServiceClient morganti2.pdf morganti2.pdf
> > it &
> > java WinsServiceClient alesi2.pdf alesi2.pdf it &
> > java WinsServiceClient morganti3.pdf morganti3.pdf
> > it &
> > java WinsServiceClient alesi3.pdf alesi3.pdf it
> >
> ------------------------------------------------------------------------------------------------
> > 
> > Best Regards
> > Feilong
> 
> 
> Felipe F. Palma Dias - São Paulo/SP
> http://www.palmadias.com.br
> MSN: palmadias@yahoo.com.br
> Yahoo: palmadias
> Mobile: +55 11 99157578
> 
> 
> 
> 
> 
> _______________________________________________________ 
> Yahoo! Acesso Grátis - Internet rápida e grátis. 
> Instale o discador agora! http://br.acesso.yahoo.com/
> 

Re: How to creating concurrent call in batch file

Posted by Felipe Palma Dias <pa...@yahoo.com.br>.
Try

start java ...


--- feilong <fe...@dfki.de> escreveu:

> Hallo,
> I want to write a batch file under windows to call 6
> instances concurrently to test whether the program
> is thread-safe. Below is the shell script for linux
> to create parallel call, it works. But if I use the
> same syntax, i.e. "&" to connect "java" call in
> batch file under windows, it only creates serial
> call, not concurrent call. 
> How can I write a windows script or a batch file
> under windows to build parallel call.
> 
> Best Regards
> saarxfk
> 
> 
> parallelCall.sh
>
------------------------------------------------------------------------------------------------
> # set the classpath
> export CLASSPATH=
> for i in jars/*jar; do export
> CLASSPATH=$CLASSPATH:$i; done
> 
> java WinsServiceClient morganti.pdf morganti.pdf it
> &
> java WinsServiceClient alesi.pdf alesi.pdf it &
> java WinsServiceClient morganti2.pdf morganti2.pdf
> it &
> java WinsServiceClient alesi2.pdf alesi2.pdf it &
> java WinsServiceClient morganti3.pdf morganti3.pdf
> it &
> java WinsServiceClient alesi3.pdf alesi3.pdf it
>
------------------------------------------------------------------------------------------------
> 
> Best Regards
> Feilong


Felipe F. Palma Dias - São Paulo/SP
http://www.palmadias.com.br
MSN: palmadias@yahoo.com.br
Yahoo: palmadias
Mobile: +55 11 99157578


	
	
		
_______________________________________________________ 
Yahoo! Acesso Grátis - Internet rápida e grátis. 
Instale o discador agora! http://br.acesso.yahoo.com/