You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by David Chang <da...@yahoo.com> on 2010/03/10 04:01:59 UTC
Wicket allow multiple Spring context files?
When I did my Spring web applications, I split Spring context files into a few smaller ones (example: one for web beans, one for DAO beans, one for Service beans, etc).
I would like to follow the same approach in my Wicket application, but I notice a few odd things:
1. The order of these Context files in web.xml plays a role. If not right, Tomcat will not start and report wicket "WebApplication" cannot be found.
2. Service beans specified through the following:
@SpringBean
private SupportService supportService;
result in runtime error that the bean of type SuppportService cannot be found if a service bean is specified in a different context file other than that of wicket "WebApplication".
Any of you had similar experience. Any fix?
Regards.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: Wicket allow multiple Spring context files?
Posted by Anantha Kumaran <an...@gmail.com>.
i am also splitting the config files into many files and i have no problems
yet.
<beans default-lazy-init="true">
<import resource="classpath:common.xml" />
<import resource="classpath:persistence.hibernate.xml" />
<!-- import the wicket application specific settiongs -->
<import resource="classpath:SpringHibernate.xml" />
</beans>
perhaps you might follow different method
On Tue, Mar 9, 2010 at 7:01 PM, David Chang <da...@yahoo.com> wrote:
> When I did my Spring web applications, I split Spring context files into a
> few smaller ones (example: one for web beans, one for DAO beans, one for
> Service beans, etc).
>
> I would like to follow the same approach in my Wicket application, but I
> notice a few odd things:
>
> 1. The order of these Context files in web.xml plays a role. If not right,
> Tomcat will not start and report wicket "WebApplication" cannot be found.
>
> 2. Service beans specified through the following:
>
> @SpringBean
> private SupportService supportService;
>
> result in runtime error that the bean of type SuppportService cannot be
> found if a service bean is specified in a different context file other than
> that of wicket "WebApplication".
>
> Any of you had similar experience. Any fix?
>
> Regards.
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>
--
----
Anantha Kumaran(http://ananthakumaran.github.com)