I'm not sure how MC fits in. I'll talk to Bill Burke about that. However, I can explain what I did:
1) Configuring Spring to treat @Context like @Autowired (a la James Strachan's Guice change): <bean id="contextAnnotationProcessor" p:autowiredAnnotationType="javax.ws.rs.core.Context" p:order="1" class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor" /> 1) Configuring Spring to understand what to do with each type that you need: XML: http://resteasy.svn.sourceforge.net/viewvc/resteasy/trunk/jaxrs/resteasy-spring/src/main/resources/springmvc-resteasy.xml?view=markup 61 <bean id="resteasy.abstract.context.bean" 62 class="org.jboss.resteasy.plugins.spring.ResteasyContextFactoryBean" p:order="0"> 63 <property name="objectTypes"> 64 <list> 65 <value>javax.ws.rs.core.UriInfo</value> 66 <value>javax.ws.rs.core.HttpHeaders</value> 67 <value>javax.ws.rs.core.Request</value> 68 <value>javax.ws.rs.ext.MessageBodyWorkers</value> 69 <value>javax.ws.rs.ext.Providers</value> 70 <value>org.jboss.resteasy.spi.HttpRequest</value> 71 </list> 72 </property> 73 </bean> The code for the FactoryBean: http://resteasy.svn.sourceforge.net/viewvc/resteasy/trunk/jaxrs/resteasy-spring/src/main/java/org/jboss/resteasy/plugins/spring/ResteasyContextFactoryBean.java?view=markup RESTEasy already proxies each of the above interfaces. Creating the proxy is trivial: ContextParameterInjector(clazz, ResteasyProviderFactory.getInstance()).inject(); 3) I created a wrapper around RESTEasy that finds all Spring configured Resources, and adds them to the RESTEasy Registry. This integration is really Spring MVC specific, and would require a bit more exploration from the Guice side of things... I'm not too familiar with the Guice's Servlet integrations, but we can probably talk about that after we get #1 and #2 ironed out. Does this help at all? -Solomon On Mon, Nov 17, 2008 at 11:00 AM, Ales Justin <[EMAIL PROTECTED]> wrote: > > > Are you interested in getting a Guice/RESTEasy integration going? I'm a > > committer to the RESTEasy project, and JBoss has been extremely open to > > integrating with multiple IoC engines. I can get the process started, > > If someone is willing to help out from the Guice-side of the world. > > What about if you integrate RESTEasy with JBoss Microcontainer (MC)? > Then Guice integration is trivial, as MC is already integrated with Guice. > > I can help you there - as one of MC authors. > > - Ales > > ps: didn't mean to hijack thread :-) > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/google-guice?hl=en -~----------~----~----~----~------~----~------~--~---
