On 09/07/2010 20:03, Ashish Kulkarni wrote:
> Hi
> I have following in context.xml, and it works fine.
> But i would like to find how many active connections are there in data
> source or how many total connections are there?
> 1 is it possible to do so?
> 
> 2 Can i change type javax.sql.DataSource
> to com.ibm.as400.access.AS400JDBCDataSource, as this has methods to find
> active connections etc?

Nope.

If you use an appropriate DataSourceFactory that creates a
AS400JDBCDataSource then you can cast the DataSource that results from
the calls to JNDI to the one you want.

Or you can use JMX to examine the running Tomcat.


p

> <Resource name="jdbc/mydev"  auth="Container"
>  type="javax.sql.DataSource"
>                   maxActive="2"
>                   maxIdle="2"
>                   maxWait="3000"
>                   username="user"
>                   password="pass"
>                   driverClassName="com.ibm.as400.access.AS400JDBCDriver"
>                   url="jdbc:as400://1mysystem;date format=iso;time
> format=iso;errors=basic;trace=false;"
>                   validationQuery="select * from   mytable" />
> 
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to