Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@apache.org Received: (qmail 66735 invoked from network); 4 Jun 2002 23:07:29 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 4 Jun 2002 23:07:29 -0000 Received: (qmail 15677 invoked by uid 97); 4 Jun 2002 23:07:19 -0000 Delivered-To: qmlist-jakarta-archive-tomcat-user@jakarta.apache.org Received: (qmail 15615 invoked by uid 97); 4 Jun 2002 23:07:18 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 15602 invoked by uid 98); 4 Jun 2002 23:07:18 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) User-Agent: Microsoft-Entourage/10.0.0.1309 Date: Tue, 04 Jun 2002 16:07:16 -0700 Subject: Re: jdbc connection list From: Phillip Morelock To: Tomcat Users List Message-ID: In-Reply-To: Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Use the Listener design pattern. You'll probably write an interface, implement it, and then register listeners with classes that will inform them of events. The java kit already has some of this pattern: HttpSessionBindingListener for example. The pattern is also prevalent throughout Swing and AWT. cheers fillup On 6/4/02 4:01 PM, "Darya Chernikhova" wrote: > > Sorry if this is a copy. I got an error message from my mail server, > after I sent this email, so I'm trying again. > Darya > > On Tue, 4 Jun 2002, Darya Chernikhova wrote: >> >> Hi all, >> >> I'd like to write a bean that would keep track of all of the jdbc >> connections that users make. >> >> So, say that I have 2 applications registered on tomcat -- appA and appB. >> And, say that there are 5 servlets or jsp pages per application -- >> appA/serv1, appA/serv2, ..., appB/serv5 . And, each servlet's doService >> method opens a jdbc connection and gets some data out of my database. >> >> I would like to write a bean that would sit there and listen to jdbc >> connections being made. It would store a list of objects containing the >> following data: >> - connection pointer >> - session the connection was made out of >> - app and servlet the connection was made out of. >> >> My problem is that I don't know much about the "connection making" process >> in Tomcat. When a new connection is made, which Tomcat controller beans >> know about it? What events are sent, and to whom? What should my bean >> extend or implement? >> >> I've been looking into the online docs and some books I have, but I >> haven't found anything useful yet. >> >> Thanks a lot for your help, >> Darya. >> >> -- >> To unsubscribe, e-mail: >> For additional commands, e-mail: >> > > > -- > To unsubscribe, e-mail: > For additional commands, e-mail: > -- To unsubscribe, e-mail: For additional commands, e-mail: