Hello ,
I am developing JSP system that works with some persistent data on the
server. I don't wont to fix the persistence mechanism - persistence
engine should be easily replaced with another one (DBManager,
FileManager, XMLManager) - and my problem is that I don't know how to
implement the initialization / destruction of the Persistent Manager
object
the ideal solution would be
// pseudo JSP page code
<some code that will be invoked when new JSP object is initialized -
will initialize the PersistenceEngine or increment a counter>
<some code that will be invoked when this JSP object is destroyed
will decrement the counter and destroy the PersistenceEngine if
counter == 0>
....
normal code that handles JSP page request // we know that the
persistence engine is initialized
...
(I have working prototype with Servlets, but generating complex
dynamic web pages from servlet is ... simple nightmare :(
there is probably some very simple (standard) solution, but I work
with JSP only for three days ...
Thank you :) and excuse my English.
--
Best regards,
heyhey mailto:[EMAIL PROTECTED]
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html