On 21-05-2009 at 12:48, Freddy Daoud wrote: > > If you're missing something "Stripesy" then that makes two of us. > > > > I would simply do this either with a ServletContextListener, or a > > simply a Servlets init method that has its Load On Startup parameter > > set. > > I agree that doing some initialization of iBATIS has little to do > with Stripes and putting that piece of code in a Servlet* init method > works and isn't difficult. > > Nevertheless, I think it would be nice to have a Stripes component > that is discovered by the extension packages mechanism and initialized > at startup. If you are already all set up for extension autodiscovery, > all you need to do is create one class with the init code inside it > and you're done, instead of having to do the ceremony of configuring > a servlet* artifact (and perhaps having to dust off the servlet spec > to remember exactly what you need to do).
Just remember to implement the ConfigurableComponent interface as well; in addition to telling Stripes to have it initialize, it also serves to give you access to Stripes' functionality to help you. Especially if you also want to explicitly tell iBATIS how to handle transactions, it's a good idea to create a class that implements both Interceptor and ConfigurableComponent: the latter to initialize, and the former to handle the transactions. Oscar -- ,-_ Oscar Westra van holthe - Kind http://www.xs4all.nl/~kindop/ /() ) (__ ( I love deadlines. I like the whooshing sound they make as they fly =/ () by. -- Douglas Adams ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________ Stripes-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/stripes-users
