Daniel Wellman
2008-10-27 02:11:38 UTC
I'm upgrading an application from Nano/Pico 1.x to Pico/PicoWeb 2.x and had a
question about using the WebappComposer. I've implemented the
WebappComposer to register all my app, request, and session components.
What's the best way to use these components in my integration tests and in
Quartz jobs?
Previously I used ContainerRecorders to grab my PicoComposer (now the
WebappComposer) and replay all the elements into the container.
DefaultPicoContainer pico = new DefaultPicoContainer();
MyPicoComposer picoComposer = new MyProductionPicoComposer();
picoComposer.getApplicationRecorder().replay(pico);
picoComposer.getSessionRecorder().replay(pico);
picoComposer.getRequestRecorder().replay(pico);
ObjectFactory.setObjectFactory(new XworkPicoObjectFactory(pico));
return pico;
In some cases, I used a few tiered PicoContainers to cache app or session
scope components (useful in tests or quartz jobs).
What's the best way to re-implement this functionality in PicoWeb 2.x? I've
looked at the WebWork2 PicoServletContainerListener; do I want to do
something like in the contextInitialized() method? Or is there some other
example code which demonstrates this?
Thanks,
Dan
question about using the WebappComposer. I've implemented the
WebappComposer to register all my app, request, and session components.
What's the best way to use these components in my integration tests and in
Quartz jobs?
Previously I used ContainerRecorders to grab my PicoComposer (now the
WebappComposer) and replay all the elements into the container.
DefaultPicoContainer pico = new DefaultPicoContainer();
MyPicoComposer picoComposer = new MyProductionPicoComposer();
picoComposer.getApplicationRecorder().replay(pico);
picoComposer.getSessionRecorder().replay(pico);
picoComposer.getRequestRecorder().replay(pico);
ObjectFactory.setObjectFactory(new XworkPicoObjectFactory(pico));
return pico;
In some cases, I used a few tiered PicoContainers to cache app or session
scope components (useful in tests or quartz jobs).
What's the best way to re-implement this functionality in PicoWeb 2.x? I've
looked at the WebWork2 PicoServletContainerListener; do I want to do
something like in the contextInitialized() method? Or is there some other
example code which demonstrates this?
Thanks,
Dan
--
View this message in context: http://www.nabble.com/Using-WebappComposer-in-tests-and-Quartz-tp20180741p20180741.html
Sent from the NanoContainer - PicoContainer - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
View this message in context: http://www.nabble.com/Using-WebappComposer-in-tests-and-Quartz-tp20180741p20180741.html
Sent from the NanoContainer - PicoContainer - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email