folks:

deep question for the true gurus.

i've inherited some code which is "servlet based" in the
sense that it runs with apache/tomcat and each server
machine loads some servlets at start up.  after that,
things get indirect.  basically, the servlet instantiates
an object (call it ObjectOne) with Class.forName().  then
within ObjectOne is a call to Class.forName( ClassTwo ),
which yields ObjectTwo.  in some cases, this process may
continue further.  the guts of the implementation is in
ObjectTwo.

as is obvious, this process does not pass on ServletContext
to either ObjectOne or ObjectTwo.  the way the system is
evolving, it would be useful to have access to the
ServletContext in ObjectTwo, which contains the actual
implementation code.  rewriting is not a Good Thing in the
short term (which always seems to be the only one around).

i've read up on SecurityManager and java.lang.ref, and it is
possible to get some information about ObjectTwo's containing
object, but from what i've read, only for display purposes;
that is, nothing is said about accessing member variables or
methods in the referenced containing objects.  have i missed
something, or does java not support this notion of object
references??

thanks,
robert young

___________________________________________________________________________
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