The fact that, escaping ':' with '\' is what I am doing and asasdmin
create-connection-pool command reports success and same for
create-jdbc-resource command. Latter, list-jdbc-connection-pool works
and shows the connection pool. But trying to test it thru my application
or ping-connection-pool reports failure. This seems like a bug.
I have reported:
https://glassfish.dev.java.net/issues/show_bug.cgi?id=8041
-vivek.
Vivek Pandey wrote:
> I don't understand. ':' is already escaped '\' character. Are you
> saying escape ':' with '\\' instead of single backslash? Why? It used
> to work in prelude. Why would single backshlash is not good enough to
> escape ':' character?
>
> -vivek.
>
>
>
> Shalini Muthukrishnan wrote:
>> Hi Vivek,
>>
>> The create-jdbc-connection-pool command mentioned below contains
>> wrong escape sequences for URL property. If you see your domain.xml,
>> only the string "jdbc" would be persisted. The right way to use it is :
>>
>> ./asadmin create-jdbc-connection-pool --datasourceclassname
>> com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource --restype
>> javax.sql.ConnectionPoolDataSource --property
>> User=root:Password=mysql:URL=jdbc*\\*:mysql*\\*://localhost/mysql
>> jdbc/bookstore_pool
>>
>> Also while doing an asadmin set on a property,
>>
>> asadmin set
>> resources.jdbc-connection-pool.jdbc/bookstore_pool.property.URL=jdbc*\*:mysql*\*://localhost*\*:3306/mysql
>>
>>
>> is the right syntax. Please see the CLI documentation for more details.
>>
>> HTH,
>> Shalini.
>>
>> Vivek Pandey wrote:
>>> On b46 of trunk:
>>>
>>> This is what I am trying:
>>>
>>> * I have a mysql database 'bookstore_development'
>>>
>>> * Create JDBC connection pool
>>>
>>> ./bin/asadmin create-jdbc-connection-pool --datasourceclassname
>>> com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource
>>> --restype javax.sql.DataSource --property
>>> User=vivek:Password=pass:URL=jdbc\:mysql\://localhost/bookstore_development
>>> jdbc/bookstore_pool
>>>
>>> *Command create-jdbc-connection-pool executed successfully.
>>>
>>> ** Create jdbc resources
>>>
>>> ./bin/asadmin create-jdbc-resource --connectionpoolid
>>> jdbc/bookstore_pool jdbc/bookstore
>>>
>>> Command create-jdbc-resource executed successfully.
>>>
>>> * list connection pools
>>>
>>> ./bin/asadmin list-jdbc-connection-pools
>>> *jdbc/bookstore_pool*
>>> __TimerPool
>>> DerbyPool
>>>
>>> * Now I test it
>>>
>>> ./bin/asadmin ping-connection-pool jdbc/bookstore_pool
>>> remote failure: Ping JDBC Connection Pool for jdbc/bookstore_pool is
>>> Failed.
>>>
>>> *Command ping-connection-pool failed.*
>>>
>>> The server log shows:
>>>
>>> -----------
>>> Apr 27, 2009 10:17:35 PM
>>> com.sun.enterprise.connectors.service.ConnectorConnectionPoolAdminServiceImpl
>>> testConnectionPool
>>> WARNING: Connection object cannot be null
>>> ----------
>>>
>>> What am I doing wrong or there is some issue with connection pool?
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net For
>>> additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>