Just to give you some info on my application
We have 2 Web Modules in the EAR
Module 1 uses spring 2.5.6 and Spring Security 2.0.4
Module 2 (new) using spring 3.1.1 and spring security 3.1.0
JUST a quick question : Can you we use different version in the modules as I mentioned above in the same EAR ?
Below is the security config for both modules
Web Module 2 - XML
Code:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:sec="http://www.springframework.org/schema/security"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<bean id="filterChainProxy" class="org.springframework.security.web.FilterChainProxy">
<sec:filter-chain-map path-type="ant">
<sec:filter-chain pattern="/**" filters="securityContext"/>
</sec:filter-chain-map>
</bean>
<bean id="securityContext" class="org.springframework.security.web.context.SecurityContextPersistenceFilter"/>
</beans>
Web Module 1 - XML (Part)
Code:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:security="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-2.0.4.xsd">
<!-- Global filter for Mandates Web application, if you want to add your filter add to the filters below you can also configure url pattern if you need invoke for a specific URL (refer spring doc for more info). -->
<bean id="filterChainProxy" class="org.springframework.security.util.FilterChainProxy">
<security:filter-chain-map path-type="ant">
<security:filter-chain pattern="/**" filters="httpSessCtxIntFilter,customJ2eePreAuthFilter,execTransFilter,filterSecurityInterceptor,mandatesSecurityFilter"></security:filter-chain>
</security:filter-chain-map>
</bean>
<!-- Add your filters here -->
<!-- TODO: Delete later This filter may not be needed -->
<bean id="mandatesSecurityFilter" class="org.frb.dal.ned.mandates.web.filter.MandatesSecurityFilter" />
<bean id="httpSessCtxIntFilter" class="org.springframework.security.context.HttpSessionContextIntegrationFilter"/>
<!-- Start Security configuration -->
<security:authentication-manager alias="authenticationManager" />
<bean id="preAuthenticatedAuthenticationProvider" class="org.springframework.security.providers.preauth.PreAuthenticatedAuthenticationProvider">
<security:custom-authentication-provider />
<property name="preAuthenticatedUserDetailsService" ref="preAuthenticatedUserDetailsService"/>
</bean>
</beans>