https://issues.apache.org/bugzilla/show_bug.cgi?id=44788

           Summary: Container parent property availability
           Product: Tomcat 5
           Version: 5.5.17
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: Catalina
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


With a custom realm deployed in a CONTEXT the related container and the parent
container (Container.getParent()) are available on the Realm.setContainer()
call.  When the realm is deployed in a HOST the container is available in the
Realm.setContainer() but the parent container (Container.getParent()) returns
null.  The parent container reference does become available later (on an
authenticate() call for example).

Example: the following code behaves differently depending on whether the
container is a HOST or a CONTEXT:
public void setContainer(Container container)
{
                this.container = container;

                if (container != null)
                {
                        // parentContainer is null if container is a HOST
                        parentContainer = container.getParent();
...

Workaround is to retain the container reference and calls its getParent() after
initialization.


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

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

Reply via email to