Re: Figuring out the Correct Approach <scratch head>
From: Oscar kind (oscar_at_danwa.net)
Date: 03/08/05
- Next message: slothbear: "simple persistence without databases"
- Previous message: Dave Brown: "Figuring out the Correct Approach <scratch head>"
- In reply to: Dave Brown: "Figuring out the Correct Approach <scratch head>"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 8 Mar 2005 19:23:41 +0100
Dave Brown <dave@removethisfromaddressdbws.net> wrote:
>
> My Application has a Listener which when first started will connect to a
> database and place a (Connection) object in the servletcontext
> attributes for access through my other jsp's and servlets..
Ouch! This will cause a connection timeout when a user opens the
application and takes a cup of coffee...
The correct approach is to open the connection for each page access, and
close it before you return to the browser. An improvement in your design
would be to put a connection pool of connection factory in the servlet
context.
-- Oscar Kind http://home.hccnet.nl/okind/ Software Developer for contact information, see website PGP Key fingerprint: 91F3 6C72 F465 5E98 C246 61D9 2C32 8E24 097B B4E2
- Next message: slothbear: "simple persistence without databases"
- Previous message: Dave Brown: "Figuring out the Correct Approach <scratch head>"
- In reply to: Dave Brown: "Figuring out the Correct Approach <scratch head>"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|