Ok, so what I've done temorarily is created a singleton class to load my 
applicationContext.xml file via the classpath. I don't like doing it this 
way because it seems managed outside of the container. I'd like the Tapestry 
system to manage it for me.

FYI - I am using Spring for DAO stuff using iBatis.

Gregg

On 5/10/05, Gregg D Bolinger <[EMAIL PROTECTED]> wrote:
> 
> I am integrating Spring into my Test Tapestry app and I am using the guide 
> in Spring in Action to do so. The snag I have is that the RequestContext has 
> been depricated in 4.0.Looking at the Tapestry docs for 4.0 I am wondering 
> if the method Spring In Action suggests is the best method anymore. Below is 
> the custom engine class they suggest creating.
> 
> public class SpringTapestryEngine extends BaseEngine {
> private static final String SPRING_CONTEXT_KEY = "springContext";
> protected void setupForRequest(RequestContext context) {
> super.setupForRequest(context);
> Map global = (Map) getGlobal();
> ApplicationContext appContext = 
> (ApplicationContext)global.get(SPRING_CONTEXT_KEY);
> if (appContext == null) {
> ServletContext servletContext = context.getServlet().getServletContext();
> appContext = WebApplicationContextUtils.getWebApplicationContext
> (servletContext);
> global.put(SPRING_CONTEXT_KEY, appContext);
> }
> }
> }
> 
> I am wondering if it might be better to do something similar but as an 
> ASO. If so, could someone guide me on setting up the hivemodule and getting 
> this to work? I'd really appreciate it.
> 
> Thanks.
> 
> Gregg Bolinger
>

Reply via email to