DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7126>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7126

Non servlet initiated requests fail to lookup java:comp/env

           Summary: Non servlet initiated requests fail to lookup
                    java:comp/env
           Product: Tomcat 4
           Version: 4.0.1 Final
          Platform: Other
        OS/Version: AIX
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Unknown
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


One of our classes implements the HttpSessionBindingListener
interface. If the http session is invalidated the valueUnbound
method is called. We wanted to log that event in a database which
is configured as a datasource. We can't use this datasource
because this lookup fails to lookup "java:comp/env" in

        Context envCtx = (Context) initCtx.lookup("java:comp/env");

which works ok for all other servlet based requests. Is it true
that only servlet based threads can access initial contexts?
What is the suggested usage pattern for this given scenario?

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to