On Fri, 11 Jun 1999, pascal jacob wrote:
> I had the same "intellectual" problem concerning the lack of a single
> entry point for a set of servlet that compose a single web-application.
> What I was thinking about, is that it would be cool if the javax.servlet
> package define a higher level class (name it webapp) having a function
> main() that would be called once and only once before any of the servlet the
> compose the web application enter its init() function.
> This webapp class, elong with its main() function would then represents
> a concept similar to the main class of regular application.
> isn't it a good idea ?
>
> ZartC++
>
Hi,
We have a lightweight app server wich uses an "AppContext" interface wich
needs to be implemented, and its AppContext.newAppContext(conf)
method is called only once. It needs also an
AppSession AppContext.getAppSession() method in order to
start (initialise) a new user session within the current application.
This way the whole application is interfaced with the application server
using a single class - the application context itself.
More details about these and other features can be found at
http://gsrsoft.hypermart.net/templates/JapsDocs/index.html
Cezar Totth
[EMAIL PROTECTED]
>
> > Hi:
> >
> > I was wondering how other developers got around the problem I am now facing.
> > I am about to start working on a project that is going to use Servlets
> > extensively, but I am running into a problem in determining the best
> > approach to take to allow the Servlets communicate with non-servlet based
> > classes (business classes).
> >
> > For example, a Database Connection pool. Most discussions about this topic
> > involve using a Singleton pattern and just getting a connection from the
> > pool when one is necessary. Thats nice and all and is in fact the approach
> > I have taken in all the Servlets that I have developed up to this point.
> > But what if you have 5, 10 or more Servlets that need to use the the same
> > Connection Pool? Which one is responsible for initializing the pool? All
> > of them? If that is the case, that might cause problems when maintaining the
> > system (one class sets the wrong parameter).
> >
> > My situation is similar to that, except the Objects that my Servlets will
> > communicate with are business objects like CustomerCreator, InvoiceCreator,
> > ShipmentCreator, etc...In application development, since I am in control of
> > what gets started when and setting up the communication links between
> > Objects and classes, I have never had problems. But with Servlets, I can't
> > think of a similar approach other than the Singleton design pattern.
> >
> > I was just wondering how developers who have developed larger servlet based
> > applications got their Servlets and their Business Objects to talk to each
> > other....
> >
> > Thank you in advance,
> >
> >
> > Chris Gow
> > [EMAIL PROTECTED]
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html