Sorry for my ignorance, I haven't looked really in depth at the CrossServletState - but why aren't we using something like Guice [1]? Or any other library that does relatively the same thing.
Thanks for the patch! - Cassie [1] http://code.google.com/p/google-guice/ On Wed, Mar 19, 2008 at 10:12 PM, Kevin Brown <[EMAIL PROTECTED]> wrote: > Since SocialDataServlet is already using CrossServletState, it would be > prudent to figure out a way to make these work cleanly together. Otherwise > it's a little weird to do half your changes in CrossServletState and the > other half by passing a list of class names. A simple solution might be to > just move the split / register logic to CrossServletState, but I suspect > that we might want a cleaner abstraction. > > On Wed, Mar 19, 2008 at 2:06 PM, Paul Lindner (JIRA) <[EMAIL PROTECTED]> > wrote: > > > > > [ > > > https://issues.apache.org/jira/browse/SHINDIG-137?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel > ] > > > > Paul Lindner resolved SHINDIG-137. > > ---------------------------------- > > > > Resolution: Fixed > > > > This is great. I plan to use this at hi5 as we move towards > > jsoncontainer.js > > > > > Enable GadgetDataServlet to be configured with GadgetDataHandlers init > > param. > > > > > > ------------------------------------------------------------------------------ > > > > > > Key: SHINDIG-137 > > > URL: https://issues.apache.org/jira/browse/SHINDIG-137 > > > Project: Shindig > > > Issue Type: Improvement > > > Components: OpenSocial - Server > > > Reporter: Changshin Lee > > > Attachments: improve-data-servlet.patch > > > > > > > > > Adding > > > @Override > > > public void init(ServletConfig config) throws ServletException { > > > super.init(config); > > > String handlerNames = config.getInitParameter("handlers"); > > > if (handlerNames == null) { > > > handlers.add(new OpenSocialDataHandler()); > > > handlers.add(new StateFileDataHandler()); > > > } else { > > > for (String handlerName : handlerNames.split(",")) { > > > try { > > > GadgetDataHandler handler = (GadgetDataHandler) > (Class.forName > > (handlerName)).newInstance(); > > > handlers.add(handler); > > > } catch (Exception ex) { > > > throw new ServletException(ex); > > > } > > > } > > > } > > > } > > > to GadgetDataServlet enables you to configure GadgetDataHandlers with > a > > web.xml init parameter like the following: > > > <!-- Serve social data --> > > > <servlet> > > > <servlet-name>socialdata</servlet-name> > > > <servlet-class>org.apache.shindig.social.GadgetDataServlet > > </servlet-class> > > > <init-param> > > > <param-name>handlers</param-name> > > > <param-value>agt.OpenSocialDataHandler</param-value> > > > </init-param> > > > </servlet> > > > This improvement is the bottom line for letting your own Shindig > > instance have a different way of data handling. > > > > -- > > This message is automatically generated by JIRA. > > - > > You can reply to this email to add a comment to the issue online. > > > > > > > -- > ~Kevin >

