Thanks for all the info everyone. Juergen, all I want is to be able to use Spring for my business and dao wiring. The problem is that I do want to use an xml file to define my beans. I am able to get the WebApplicationContext out of the servlet context in a class that subclasses WebApplication. Obviously this method allows for the use of an xml file. However, because Spring's WebApplicationContext(particularly XmlWebApplicationContext, an implementing class) is not serializable, it throws an exception. Do you know of an elegant solution to this? I believe after that hurdle it should be pretty easy to access the applicationContext from any page.

----- Original Message ----- From: "Juergen Donnerstag" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, January 08, 2005 11:34 PM
Subject: Re: [Wicket-user] Servlet Context



Unfortunately I'm not a Spring expert either and I guess there are
plenty of way on how to integrate Spring. What I tried to achieve with
the Spring example
a) xml config of wicket app settings
b) assuming someone has an existing spring web application. how to add
wicket support to this web application and allow for a phased
migration of web pages from spring to wicket.
Though I did develop a spring page factory as well, I skipped that
idea later on, because I liked the wicket way much better. may be I
just did not have the compelling use case.

The question probably is what you want to achieve.
1) Use Spring's BeanFactory and DAO features only for your business
and dao layer. That is fairly straight forward as the only thing you
probably need is to create the factory and make a ref accessible
through your own Wicket application object, derived from
WebApplication. You'd use spring for your app, but you wouldn't
improve on wicket. I tried that in a real life project and it works
fine. The approach however does not allow to configure wicket's app
settings through a spring xml file and it does not allow to slowly
migrate from an exisiting spring app to wicket.
2) the example provided tries to achieve: xml config of wicket apps
settings and pluggable - through spring xml - implementation of wicket
core components which are configurable through wicket apps settings.

some more notes in random order:
- to implement solution 1 you may not need the additional features
offered by spring's webapplicationcontext like localization, access to
servlet context etc., because you should have that through wicket
already
- I failed to create a spring webAppContext, add wickets apps object
to it and make it accessible within spring's xml file. That is, not
using spring's mvc like I did, but have wicket's apps object magically
available within your xml.
- the example provided has dependencies to almost all spring jars,
where as 1 has only deps to spring core jars.

Because I'm not the Spring expert, there are probably better ways to
achieve these goals and yes, I'd like to discuss different approaches
and see better solutions comeing up.

Juergen


------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user





------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to