This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 25802

Summary: USABILITY: ServletContextListener template should include useful sample code or none
Product: javaee Reporter: Ana.von Klopp <avk>
Component: CodeAssignee: Milan Kuchtiak <mkuchtiak>
Status: RESOLVED FIXED    
Severity: blocker CC: asunhachawee
Priority: P4 Keywords: UI
Version: 3.x   
Hardware: PC   
OS: Windows ME/2000   
Issue Type: ENHANCEMENT Exception Reporter:

Description Ana.von Klopp 2002-07-19 04:35:01 UTC
The ServletContextListener template has some
comments and commented out code in the methods
which is not really helpful (the example says to
set up the database connection when the app
intitializes and to close it when the app closes). 

It's kind of unlikely that an app uses only one db
connection, so I think we should take that out. 

The sort of thing that you might want to use this
for is to set up application defaults by reading
them in from a configuration file for example,
although that's typically not the sort of thing
that needs to do anything on exit. Also you could
use it to set up a DB connection pool. Anyway, if
we provide suggestions to what might go in there,
they should make sense and be helpful.
Comment 1 Marek Grummich 2002-07-22 12:09:38 UTC
Set target milestone to TBD
Comment 2 Marek Grummich 2002-07-22 12:18:25 UTC
Set target milestone to TBD
Comment 3 Ana.von Klopp 2002-08-21 02:44:13 UTC
Jeff, please address this in the usability proposal. 
Comment 4 Ana.von Klopp 2002-08-21 02:45:17 UTC
got the assignments wrong
Comment 5 Milan Kuchtiak 2002-09-02 08:40:53 UTC
Agree, ServletContextListener can be used for many 
different things. Also for getting some JNDI Resource(s).

There is only one example shown - a simple database 
connection. I think, its obvious enough that the simple 
connection can be extended to establishing some DB 
connection pool.

Ana(Jeff),could you suggest some more educative examples 
(suggestions) that could be put into the tepmlate ?