You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2008/04/09 20:01:24 UTC
DO NOT REPLY [Bug 44788] New: Container parent property availability
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: tomcat-dev@jakarta.apache.org
ReportedBy: c.beckey@comcast.net
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 44788] Container parent property availability
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=44788
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Mark Thomas <ma...@apache.org> 2008-04-09 15:16:10 PST ---
This is a side-effect of how the digester works and the order objects are
created.
When setContainer() is called, state is not fully configured.
When the init() method is called, the container hierarchy is correctly set.
--
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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org