users@glassfish.java.net

Re: asadmin command and spaces

From: Jagadish Prasath Ramu <Jagadish.Ramu_at_Sun.COM>
Date: Thu, 07 Jun 2007 21:13:53 +0530

My previous post works fine in Linux.

This will be for Windows.

create-connector-connection-pool --raname myjca.rar
--connectiondefinition javax.sql.DataSource --steadypoolsize 1
--maxpoolsize 15 --poolresize 1 --idletimeout 3600 --maxwait 30000
--property "logFileName=C\:/\Program Files/\Product/\logs/\abcd%
g.log:logFileMaxBytes=102400:logFileCount=10:port=4254:hotelName=Some
Name With Spaces:hotelCode=abcd" --transactionsupport NoTransaction
--description "my description" myNewPoolName5

Thanks,
-Jagadish

On Thu, 2007-06-07 at 11:21 -0400, Ryan de Laplante wrote:
> Thanks Jagadish!
>
> When I use single quotes as shown for --description and also in my
> properties, the single quotes become part of the string that show up in
> the web based console inside of the text boxes. It still won't let me
> use a space character. I get the following error:
>
> CLI019 Invalid number of operands. Number of operands should be equal to 1.
>
> When I try to use \: or even /\ in my path name (which is inside of
> single quotes), I get a different error:
>
> CLI131 Invalid property syntax.
>
>
> Thanks,
> Ryan
>
>
> Jagadish Prasath Ramu wrote:
> > I hope the following sample addresses all of your requirements.
> >
> > bin/asadmin create-connector-connection-pool --raname myjca.rar
> > --connectiondefinition javax.sql.DataSource --steadypoolsize 1
> > --maxpoolsize 15 --poolresize 1 --idletimeout 3600 --maxwait 30000
> > --property logFileName='C\:/\Program Files/\Product/\logs/\abcd%
> > g.log':logFileMaxBytes=102400:logFileCount=10:port=4254:hotelName='Some
> > Name With Spaces':hotelCode=abcd --transactionsupport NoTransaction
> > --description 'my description' myNewPoolName1
> >
> > For more details on --description, --transactionsupport,
> > please refer the reference manual:
> > http://docs.sun.com/app/docs/doc/819-3662/6n5s9hmti?a=view
> >
> > Thanks,
> > -Jagadish
> >
> > On Wed, 2007-06-06 at 15:50 -0400, Ryan de Laplante wrote:
> >
> >> Hi,
> >>
> >> 1) Because of a bug in Glassfish (which is now fixed, but is not
> >> released in Sun App Platform U3) I have had to use asadmin CLI to create
> >> a connection pool for a custom JCA connector. My connector has a bunch
> >> of properties that I can set values for and I've found out how to do
> >> that with asadmin. I can't figure out how to do spaces in my property
> >> values though. Here is an example command:
> >>
> >> asadmin> create-connector-connection-pool --raname MyCustomRA
> >> --connectiondefinition javax.resource.cci.ConnectionFactory
> >> --steadypoolsize 1 --maxpoolsize 15 --poolresize 1 --idletimeout 3600
> >> --maxwait 30000 --property logFileName=C:\Program
> >> Files\Product\logs\abcd%g.log:logFileMaxBytes=102400:logFileCount=10:port=4254:hotelName=Some
> >> Name With Spaces:hotelCode=abcd myNewPoolName
> >>
> >> The logFileName and hotelName properties have spaces. I've tried
> >> putting the entire properties section inside of quotes, putting a \ in
> >> front of the spaces, putting a \ in front of existing \ (in the path),
> >> etc... can't figure it out.
> >>
> >>
> >> 2) How do I set a description for the connection pool using this
> >> command? I did not see a description argument.
> >>
> >> 3) How do I set transaction support to none? I did not see a
> >> transaction support argument.
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>