Spring应用程序在请求之间挂起或等待很长时间

时间:2014-10-01 22:11:48

标签: spring spring-security websphere

我们有spring 3.2应用程序,它在我们的本地tomcat 7.1下运行正常,但是当我在QA中安装在websphere服务器上时它会挂起或等待请求之间的时间。当应用程序开始响应时,我没有看到任何错误。这是我在看到上述行为之前看到的调试语句


[10/1/14 17:25:40:385 EDT] 000000ba SystemOut     O 17:25:40.384 [WebContainer : 0] DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request
[10/1/14 17:25:40:386 EDT] 000000ba SystemOut     O 17:25:40.386 [WebContainer : 0] DEBUG o.s.s.w.a.ExceptionTranslationFilter - Chain processed normally
[10/1/14 17:25:40:386 EDT] 000000ba SystemOut     O 17:25:40.386 [WebContainer : 0] DEBUG o.s.s.w.c.SecurityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed

服务器上没有死锁,websphere端没有内存问题或线程锁定。这是spring的安全配置

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:security="http://www.springframework.org/schema/security"
   xsi:schemaLocation="http://www.springframework.org/schema/beans
   http://www.springframework.org/schema/beans/spring-beans.xsd
   http://www.springframework.org/schema/security
   http://www.springframework.org/schema/security/spring-security-3.1.xsd">

<security:http use-expressions="true"
               entry-point-ref="loginEntryPoint">

    <security:intercept-url pattern="/vcm/**" access="permitAll"/>
    <security:intercept-url pattern="/resources/**" access="permitAll"/>
    <security:intercept-url pattern="/landing/menu/**" access="permitAll"/>
    <security:intercept-url pattern="/support/**" access="permitAll"/>
    <security:intercept-url pattern="/login" access="permitAll"/>
    <security:intercept-url pattern="/login/**" access="permitAll"/>
    <security:intercept-url pattern="/logout" access="permitAll"/>
    <security:intercept-url pattern="/logout/**" access="permitAll"/>
    <security:intercept-url pattern="/loginError" access="permitAll"/>


    <security:intercept-url pattern="/**" access="hasRole('ROLE_USER')"/>
    <security:access-denied-handler error-page="/loginError"/>
    <security:custom-filter ref="learningAuthenticationFilter" position="FORM_LOGIN_FILTER"/>
    <security:logout  logout-url="/logout"
                      delete-cookies="ES,JSESSIONID,olsUserData,XServer"
                      success-handler-ref="learningLogoutSuccessHandler"/>

</security:http>


<bean id="learningLogoutSuccessHandler"
      class="com.mbusa.learn.security.LearningLogoutSuccessHandler">

</bean>

<security:authentication-manager alias="authenticationManager">
    <security:authentication-provider ref="learningAuthenticationProvider"/>
</security:authentication-manager>

<bean id="learningAuthenticationService"           class="com.mbusa.learn.security.LearningAuthenticationServiceImpl">
</bean>

<bean id="learningAuthenticationProvider"
      class="com.mbusa.learn.security.LearningAuthenticationProvider">
    <constructor-arg ref="learningAuthenticationService"/>
</bean>

<bean id="learningAuthenticationFilter" class="com.mbusa.learn.security.LearningAuthenticationFilter">
    <property name="filterProcessesUrl" value="/login"/>
    <property name="authenticationManager" ref="authenticationManager"/>
    <property name="usernameParameter" value="j_username"/>
    <property name="passwordParameter" value="j_password"/>
    <property name="authenticationSuccessHandler">
        <bean class="org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler">
            <property name="defaultTargetUrl" value="/"/>
        </bean>
    </property>
    <property name="authenticationFailureHandler">
        <bean class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler">
            <property name="defaultFailureUrl" value="/loginError"/>
        </bean>
    </property>
</bean>
<bean id="loginEntryPoint"
      class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint">
    <constructor-arg value="/login/form"/>
</bean>

有没有

0 个答案:

没有答案