Yes, I agree. It depends upon how tight you want your control to be. Also
keeping in mind that Travis may want this server independent. These are
issues and questions I came up with working with Jakarta / Tomcat stuff.
Now I'm all about JRun but still run into Tomcat. Certainly the pooling
features of JRun can cut it very well but more control is sometimes wanted.
Now to answer your question: "Anyways, the idea you are talking about would
probably work good, but when
would you check for old connections?"
You can run this as a process on the server, activating at regular time
intervals. And of course check for rampant connections (call the method to
do this) on the error page just for good measure. This way you can test not
so much for old connections but trashed connections from the error.
Matt
Matthew L. Wright
Java Internet Programmer
Jupiter One
Web World Studios West Coast
www.jupiterone.com
(818) 763-2927
----- Original Message -----
From: "Pady Srinivasan" <[EMAIL PROTECTED]>
To: "JRun-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, March 13, 2001 2:29 PM
Subject: RE: Re: Re: Re: Accessing a variable from errorpage?
>
> Assuming you are using JRun, setting up pooling using JRun, and setting
the
> "timeout" feature in local.properties seems easier.
>
> -- pady
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 13, 2001 2:20 PM
> To: JRun-Talk
> Subject: RE: Re: Re: Re: Accessing a variable from errorpage?
>
>
> Ya, that could work. I'm not using a Singleton, using
>
> ServletContext context = getServletContext();
> pool = (ConnectionPool)(context.getAttribute("conn-pool"));
>
> Similar functionality though.
>
> Anyways, the idea you are talking about would probably work good, but when
> would you check for old connections?
>
> Travis
>
> ---- Original Message ----
> From: "Matthew L. Wright" <[EMAIL PROTECTED]>
> Sent: 2001-03-13 11:05:40.0
> To: JRun-Talk <[EMAIL PROTECTED]>
> Subject: Re: Re: Re: Accessing a variable from errorpage?
>
> Let's see. So you have a Singleton that manages in a pool of connections
of
> sorts. Everytime a connection is accessed a variable representing the
time
> it was last accessed is set. If the difference between that variable and
> the curren time is greater than Y then you drop the connection. That's
more
> my preferred method of doing it. There are various ways of implementing
> this, I'll detail if you want. Also, what sort of pooling are you using
on
> the server? This always counts for something but I've found a lot of Java
> guys just don't use it. I don't know why, as I always preferred to build
my
> pooling into the server thereby going right to the heart of where pooling
> should be managed. The pooling options on JSP servers themselves are
great
> in many cases.
>
> Matt
>
> Matthew L. Wright
> Java Internet Programmer
> Jupiter One
> Web World Studios West Coast
> www.jupiterone.com
> (818) 763-2927
> ----- Original Message -----
> From: <[EMAIL PROTECTED]>
> To: "JRun-Talk" <[EMAIL PROTECTED]>
> Sent: Tuesday, March 13, 2001 9:05 AM
> Subject: RE: Re: Re: Accessing a variable from errorpage?
>
>
> > That may work. About timing out. How do you make the connections time
> out after a period of no use?
> >
> > Travis
> >
> > ---- Original Message ----
> > From: "Matthew L. Wright" <[EMAIL PROTECTED]>
> > Sent: 2001-03-13 01:05:50.0
> > To: JRun-Talk <[EMAIL PROTECTED]>
> > Subject: Re: Re: Accessing a variable from errorpage?
> >
> > Ah, for some reason I thought you were in a testing environ. Do have a
> > Singleton bean/class running through RMI to manage connections? This
way
> > you can timeout connections.
> >
> > Another option is while creating this Singleton (bean running and
accessed
> > via RMI as a standing process on the server) name a method that
maintains
> > and distributes connections, associate the session ID with the
connection.
> > Carry the session ID as a session based variable (or just pull it as you
> > please really) and on the error page check for a property of your
> Singleton
> > that associates the session ID with the connection object. This way you
> > control the amount of connections and can associate who (you could check
> to
> > see if cutting this connection would cut others sharing the same
> connection
> > as well) was cut and what connection they were using and if you should
cut
> > it or keep it as you please.
> >
> > Hope this helps.
> >
> > Matt
> >
> > Matthew L. Wright
> > Java Internet Programmer
> > Jupiter One
> > Web World Studios West Coast
> > www.jupiterone.com
> > (818) 763-2927
> > ----- Original Message -----
> > From: <[EMAIL PROTECTED]>
> > To: "JRun-Talk" <[EMAIL PROTECTED]>
> > Sent: Monday, March 12, 2001 4:42 PM
> > Subject: RE: Re: Accessing a variable from errorpage?
> >
> >
> > > Problem with that is that you would have one connection per session.
> That
> > is just unfeasible. 1000 users, 1000 connections, 10000 users.........
> > >
> > > Travis
> > >
> > > ---- Original Message ----
> > > From: "Matthew L. Wright" <[EMAIL PROTECTED]>
> > > Sent: 2001-03-12 17:27:27.0
> > > To: JRun-Talk <[EMAIL PROTECTED]>
> > > Subject: Re: Accessing a variable from errorpage?
> > >
> > > Assign the connection to a session based variable then use that
variable
> > > throughout the site. On the error page close it out. Something of
that
> > > sort would work great. I have example code along these lines if
needed.
> > >
> > > Matt
> > > Matthew L. Wright
> > > Java Internet Programmer
> > > Jupiter One
> > > Web World Studios West Coast
> > > www.jupiterone.com
> > > (818) 763-2927
> > > ----- Original Message -----
> > > From: <[EMAIL PROTECTED]>
> > > To: "JRun-Talk" <[EMAIL PROTECTED]>
> > > Sent: Monday, March 12, 2001 4:16 PM
> > > Subject: Accessing a variable from errorpage?
> > >
> > >
> > > > Is there a way to access a variable from the page that threw the
> > > exception?
> > > >
> > > > Because what i'm finding is that when an error occurs, I can't
access
> my
> > > db connection to close it. Anyway around this without having to wrap
> > every
> > > page in my own try block?
> > > >
> > > > Travis Reeder
> > > > Chief Software Architect
> > > > ThinkVirtual
> > > >
> > > >
> > > >
> > >
> >
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists