Hi, you have to user a classloader per Webapp, so the InjectorHolder has
for each webapp the correct Springcontext. (injectorholder uses a static
variable)

martin

Steve Hiller schrieb:
> Hi All,
>
> I'm not sure if this is a Wicket, Spring or WebSphere issue or some 
> combination of the 3.
>
> General Setup:
> WebSphere 6.1, wicket 1.3.7, Spring 2.5.6
>
> Specific Setup:
> 1 EAR contains 2 WARs, call them WAR1 and WAR2.
> Each WAR uses the Wicket & Spring frameworks.
> The EAR is deployed to WebSphere -- each WAR's deployment descriptor
> uses the WicketServlet and SpringContextLoaderServlet to control their 
> respective frameworks
> (see 
> http://cwiki.apache.org/WICKET/websphere.html#Websphere-WicketServletratherthanWicketFilter)
> Each WAR holds its Spring application configuration file 
> (applicationContext.xml) under its WEB-INF directory.
> Each applicationContext.xml file wires up a service bean.
> The service beans are for two completely different classes, call them 
> Service1 (in WAR1) and Service2 (in WAR2).
>
> Problem:
> If I run the WAR1 web application first, then it successfully uses its 
> Service1 bean.
> But, if I then run the WAR2 web application, it cannot find its Service2 bean.
> This also happens in reverse order. That is, if I run the WAR2 web 
> application first, then it
> successfully uses its Service2 bean, but then running the WAR1 application 
> fails to find
> its Service1 bean. The failure exception is like:
>
>   java.lang.IllegalStateException: bean of type [war1.Service1] not found
>     at 
> org.apache.wicket.spring.SpringBeanLocator.getBeanNameOfClass(SpringBeanLocator.java:107)
>     at 
> org.apache.wicket.spring.SpringBeanLocator.getBeanName(SpringBeanLocator.java:192)
>     at 
> org.apache.wicket.spring.SpringBeanLocator.isSingletonBean(SpringBeanLocator.java:133)
>     at 
> org.apache.wicket.spring.injection.annot.AnnotProxyFieldValueFactory.getFieldValue(AnnotProxyFieldValueFactory.java:90)
>     at org.apache.wicket.injection.Injector.inject(Injector.java:108)
>     at 
> org.apache.wicket.injection.ConfigurableInjector.inject(ConfigurableInjector.java:39)
>     
> Has anyone come across this issue before?
>
> Thanks,
> Steve
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to