If your Spring does not rely on the persistence managed by Guice, it should 
be sufficient to place the Spring filter before the Guice filter in web.xml.

However, *if it depends* on Guice-managed persistence, the persistence 
filter would need to span the Spring filter which would only be possible if 
you could setup the Spring filter in you Servlet Module - which I don't 
know how to manage..

Finally the Shiro aproach is way cleaner as there is an existing Guice 
integration. And it works pretty well.



Am Montag, 19. März 2012 07:33:51 UTC+1 schrieb Matías Williams:
>
> Any answer on this?
> I'm having the same problem.
>
> On Thursday, March 15, 2012 5:49:55 AM UTC-3, pepperbob wrote:
>>
>> I run a web application with guice2 + warp persist (multiple datasources) 
>> including spring security & jersey. I'm trying to migrate to guice3 + 
>> guice-persist and made the following observation:
>>
>> due to the setup, it is required to run the persist filter at first, then 
>> spring security and finally the jersey relevant part (via my guice servlet 
>> module). As the warp-filter has been setup through web.xml this has not 
>> been a problem so far.
>>
>> With guice3 the persistence filter is setup in my servlet module which 
>> also takes care about jersey (jersey-guice integration). This means that I 
>> cannot run the spring security filter in between as it needs to be setup 
>> via web.xml (and esp. after the persistence filter as it uses guice managed 
>> beans).
>>
>> Any pointers or ideas how this could still work out? The only way I could 
>> think is to de-couple spring security from the guice managed persistence 
>> but I don't really like that. Maybe I should move to Apache Shiro as there 
>> is a guice integration.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"google-guice" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-guice/-/LZOE7qNLgPAJ.
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.

Reply via email to