Resolution: Won't Fix
Affects Version/s: Release 1.5.3
Fix Version/s: None
Component/s: ActionBean Dispatching
Environment:Tomcat 5.5, Stripes deployed as shared library.
I have two applications deployed on the Tomcat server, with Stripes deployed as a shared library. Both contain ActionBeans with the same names. The name patterns are following:
The applications are deployed in different contexts: app1 and app2. So, the beans are accessible under following urls (relative to server root):
The problem is that only one of the ActionBeans are accessible at the same time. If app2 is deployed latter, its ActionBean is resolved correctly, but any request to /app1/Some.action is resolved also to /app2/Some.action. Analogical problem occurs when app1 is deployed after app2.
I found following comment in the UrlBindingFactory.addBinding() method:
"Search for a class that has already been added with the same name as the class being added now. If one is found then remove its information first and then proceed with adding it. I know this is not technically correct because two classes from two different class loaders can have the same name, but this feature is valuable for extensions that reload classes and I consider it highly unlikely to be a problem in practice."
I'm not familiar with the code enough to be sure that this design decision is a reason of the problem (however, the Tomcat uses different class loader for each application). But if so, it's also quite big limitation imposed on applications internal architecture. Maybe the context path could be also taken into account in internal structures of the dispatcher?