Hi, If you use the javax.sql extension API you can be notified whenever a connection is closed, using the javax.sql.ConnectionEvent Listener interface. I think that most major Database vendors support this ?? but ralph is right, there is no standard way to be notified when a connection is opened. I suppose you should consider writing or using some kind of connection pool object which manages all the Connections across your applications. This is a widely used techinque and theres plenty documentaion out there about connection pools. You at least need to create a class that sits between your application and the standard JDBC way of getting a connection, so that you could generate the events you want or keep a count of open connections. i.e. this would involve changing all your servlets/jsps, to get connections the new way,
Steve. -----Original Message----- From: Ralph Einfeldt [mailto:[EMAIL PROTECTED]] Sent: 05 June 2002 15:47 To: Tomcat Users List Subject: AW: jdbc connection list For connection you are out of luck. There is nothing like a common event model for connections or connection pools. (No driver or pool that I know has a feature like this). One solution if you have complete control over any class that accesses the database: Wrap the pool or the connection inside a own class that delegates all get/release calls to the underlying class and track the connection count. If you have third party tools that access the database I think that you have lost with the most databases. With some database it's possible to get a list of open connection through system views or stored procedures. (E.g. Oracle) but that's not portable. > -----Urspr�ngliche Nachricht----- > Von: Darya Chernikhova [mailto:[EMAIL PROTECTED]] > Gesendet: Mittwoch, 5. Juni 2002 16:34 > An: Tomcat Users List > Betreff: Re: jdbc connection list <snip/> > I'd like to write a bean that would keep track of all > of the jdbc connections that users make. <snip/> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> __________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information, visit http://www.messagelabs.com _____________________________________________________________________ This message from All-Hotels has been checked for all known viruses by the MessageLabs Virus Scanning Service. For further information visit: http://www.messagelabs.com/stats.asp
winmail.dat
Description: application/ms-tnef
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
