-
Jan 23rd, 2012, 12:42 PM
#1
inter-container dependency problem
hi,
i'm having problems with inter-container dependencies between a parent and child container when the parent is loaded in a ContextLoaderListener (needed for spring security) and the child is loaded in a DispatcherServlet.
For example: Spring Security OAuth2 context needs to be loaded in the ContextLoaderListener (because it needs to leverage the DelegatingFilterProxyfilter to execute the springSecurityFilterChain).
However, the problem here is that Spring Security OAuth2 provides a few @Controller classes. The @Controller classes are loaded in the parent container while the @EnableWebMCV Feature is enabled on the DispatcherServlet container. The result is that the Spring Security OAuth2 controllers are not available, which breaks the whole module. Moving the Spring Security OAuth2 configuration into the DispatcherServlet is not an option, because it then the springSecurityFilterChain is not available.
The same problem occurs also with TransactionManagement (as @Transactional methods are only woven in the container where the Feature is enabled) and is not related to Spring Security OAuth2 in particular.
A solution might be to load everything twice, but that seems a little silly. Maybe i don't understand the container concept. Any help on this subject would be much appreciated as I do not have any resolution to the problem.
cheers
Last edited by vonbrittelstrausse; Jan 23rd, 2012 at 12:56 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules