Hi,

after reading all about inter-servlet comm. and NOT being sure
of having understood it all correctly, I came up with the following design:

1. "Master Servlet": Stores all "handles" to the several servlets:

public class ICDesk extends HttpServlet


(...)

  public static  DBQuery   q;
  public static  HTMLUtil  h;
  public static  ICUser    u;
  public static  ICDesk    d;

(...)

public void doPost (HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException {

    q = (DBQuery)   getServlet(req, "DBQuery");
    h = (HTMLUtil)  getServlet(req, "HTMLUtil");
    u = (ICUser)    getServlet(req, "ICUser");
    d = (ICDesk)    getServlet(req, "ICDesk");

    (...)
}


2. "Slaves" - One slave as an example:

public class ICNotes extends HttpServlet


  private ICDesk    d;
  private DBQuery   q;
  private HTMLUtil  h;
  private ICUser    u;

  (...)

public void doPost (HttpServletRequest req, HttpServletResponse res) throws
ServletException, IOException {

    d = ICDesk.d;
    q = ICDesk.q;
    h = ICDesk.h;
    u = ICDesk.u;

    (..)
}


I'd like to now what a experienced Servlet programmers would say to this.
Does this solve the class loader issue or am I just lucky?
(I use Servlet SDK 2.0 not 2.1 !)

Thanx

Oliver



Mit freundlichen Gr��en

Oliver Pistor

-----------------------------------------------------------------------
Oliver Pistor
dsa Solutions
Pf�lzer Str.6
69123 Heidelberg

Tel.: 06221 839 513
Mobil: 0172 761 9365
Fax: +49 6221 472675

[EMAIL PROTECTED]
http://www.dsa-solutions.de

___________________________________________________________________________
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

Reply via email to