users@glassfish.java.net

asadmin large batch of commands

From: Ryan de Laplante <ryan_at_ijws.com>
Date: Thu, 06 Sep 2007 13:24:19 -0400

I have about 200 commands that I want to batch that creates a connection
pool for a JCA connector, then a JNDI resource for it. To do a single
pool + resource, the command looks like this:

create-connector-connection-pool --raname CicoKioskClientRA
--connectiondefinition javax.resource.cci.ConnectionFactory
--steadypoolsize 1 --maxpoolsize 15 --poolresize 1 --idletimeout 3600
--maxwait 30000 --property
"logFileName=D\:\\dev\\CicoKioskClientRA\\log\\auslp%g.log:logFileMaxBytes=102400:logFileCount=10:hostName=111.111.111.111:port=4444:userName=user:password=secret:ktypValue=avalue:wbidValue=avalue:htnmValue=ijwHotel:ksidValue=avalue:hotelName=One
Hotel In A Chain:hotelCode=auslp" --transactionsupport NoTransaction
--description "A Hotel In A Chain" auslpPool

create-connector-resource --poolname auslpPool --description "A Hotel In
A Chain" cicokiosk/auslp


When I have both commands on two separate lines and paste it into the
asadmin command prompt, it works. If I start to paste more lines at the
same time I get an error:

CLI144 Could not display prompt or read from input.


Am I filling the command buffer? I also tried creating a Windows batch
file:

"C:\Program Files\Sun\GlassfishV2Rc4\bin\asadmin"
create-connector-connection-pool --raname CicoKioskClientRA
--connectiondefinition javax.resource.cci.ConnectionFactory
--steadypoolsize 1 --maxpoolsize 15 --poolresize 1 --idletimeout 3600
--maxwait 30000 --property
"logFileName=D\:\\dev\\CicoKioskClientRA\\log\\auslp%g.log:logFileMaxBytes=102400:logFileCount=10:hostName=111.111.111.111:port=4444:userName=user:password=secret:ktypValue=avalue:wbidValue=avalue:htnmValue=ijwHotel:ksidValue=avalue:hotelName=One
Hotel In A Chain:hotelCode=auslp" --transactionsupport NoTransaction
--description "A Hotel In A Chain" auslpPool

"C:\Program Files\Sun\GlassfishV2Rc4\bin\asadmin"
create-connector-resource --poolname auslpPool --description "A Hotel In
A Chain" cicokiosk/auslp


But it fails too complaining about the --property syntax on the first
command. I suspect the batch file's call to the asadmin batch file is
truncating the input parameters.


Any help to create a script to run a couple hundred commands of this
size would be appreciated.


Thanks,
Ryan