You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Darya Chernikhova <dc...@columbia.edu> on 2002/06/04 22:47:22 UTC

jdbc connection list

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?

Thanks a lot for your help,
Darya.




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


if you want to help a newbie

Posted by Paul Clifford <pa...@canada.com>.
Hi, I just joined the list today. I have installed Tomcat-4.0.3 on 
Redhat Linux-7.3 running Apache-1.3.23.
A starting question, J2EE (i'm using 1.3.1) says it includes tomcat, is 
it bad to have both The stand alone tomcat RPM and J2EE installed. Might 
they conflict somehow?


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: jdbc connection list

Posted by anette mysel <ca...@cox.net>.
PLEASE REMOVE NE FROM YOUR MAILING LIST. I DO NOT KNOW WHO YOU ARE. THANK
YOU...
----- Original Message -----
From: "Darya Chernikhova" <dc...@columbia.edu>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Wednesday, June 05, 2002 9:33 AM
Subject: Re: jdbc connection list


>
> I need to know what to listen to.  What events, to which objects, does the
> Connection send when it gets initiated?
>
> Thanks,
> Darya.
>
> On Tue, 4 Jun 2002, Phillip Morelock wrote:
>
> > also called the Observer pattern.
> >
> >
> > On 6/4/02 4:07 PM, "Phillip Morelock"
<su...@phillipmorelock.com>
> > wrote:
> >
> > > 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" <dc...@columbia.edu> 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:
> > >>> <ma...@jakarta.apache.org>
> > >>> For additional commands, e-mail:
> > >>> <ma...@jakarta.apache.org>
> > >>>
> > >>
> > >>
> > >> --
> > >> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > >> For additional commands, e-mail:
<ma...@jakarta.apache.org>
> > >>
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> > For additional commands, e-mail:
<ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: jdbc connection list

Posted by Darya Chernikhova <dc...@columbia.edu>.
I need to know what to listen to.  What events, to which objects, does the
Connection send when it gets initiated?

Thanks,
Darya.

On Tue, 4 Jun 2002, Phillip Morelock wrote:

> also called the Observer pattern.
>
>
> On 6/4/02 4:07 PM, "Phillip Morelock" <su...@phillipmorelock.com>
> wrote:
>
> > 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" <dc...@columbia.edu> 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:
> >>> <ma...@jakarta.apache.org>
> >>> For additional commands, e-mail:
> >>> <ma...@jakarta.apache.org>
> >>>
> >>
> >>
> >> --
> >> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> >> For additional commands, e-mail: <ma...@jakarta.apache.org>
> >>
> >
> >
> > --
> > To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: jdbc connection list

Posted by Phillip Morelock <su...@phillipmorelock.com>.
also called the Observer pattern.


On 6/4/02 4:07 PM, "Phillip Morelock" <su...@phillipmorelock.com>
wrote:

> 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" <dc...@columbia.edu> 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:
>>> <ma...@jakarta.apache.org>
>>> For additional commands, e-mail:
>>> <ma...@jakarta.apache.org>
>>> 
>> 
>> 
>> --
>> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
>> For additional commands, e-mail: <ma...@jakarta.apache.org>
>> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: jdbc connection list

Posted by Phillip Morelock <su...@phillipmorelock.com>.
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" <dc...@columbia.edu> 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:   <ma...@jakarta.apache.org>
>> For additional commands, e-mail: <ma...@jakarta.apache.org>
>> 
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: jdbc connection list

Posted by Darya Chernikhova <dc...@columbia.edu>.
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:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>