Announcement Announcement Module
No announcement yet.
Cglib2AopProxy is not gettting Target in Websphere 8.0 Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cglib2AopProxy is not gettting Target in Websphere 8.0

    I am using Spring 2.5.6 and moved to Webshpere 8.0 from Weblogic 10.

    when I am getting the Bean from the Scope The bean is not loaded with the previously setting values, but returning a new instance of the bean.

    Use Case:
    When I login, My Interceptor interferes and set the login information in Session object declared as given below.
    <bean id="session" class=""
    <aop:scoped-proxy />

    I have declared my Advice as given below
    <bean id="sessionValidationAdvice"
    class="com.myproject.aspects.SessionValidatorAdvic e">
    <property name="session" ref="session" />

    <bean id="sessionValidationAdvisor"
    class=" dPointcutAdvisor">
    <property name="advice" ref="sessionValidationAdvice" />
    <property name="pattern"
    value="com.myproject.impl.SessionValidationService Impl.(?!logon)(?!initialize)(?!set*).*" />

    I declared the listener in the web.xml as given below
    <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>

    In the Cglib2AopProxy$DynamicAdvisedInterceptor.intercept method, when the getTarget() is invoked, I am not getting the Session object from the Session scope, but I am getting a new Session obeject everytime and not able to see the loginId set into the session object in the previous request and the code is invalidating the Session due to this.

    This is happening only in Websphere 8.
    Please could you give me any information on how to fix this issue in Websphere 8?

    Thank you,

  • #2
    Re:Cglib2AopProxy is not gettting Target in Websphere 8.0

    I chaged the session scope to globalSession still the same issue.
    I would like to know if there is any jar or classpath that I have to set up in Websphere 8 to keep Session scoped beans alive in the Session, why the bean is not loaded from the Spring Session scope and everytime it is reinstatiated to default values? any ideas?

    surprisingly, the same ear is working fine in Websphere 7

    Please can any one look into this issue?

    Thank you,


    • #3
      May I know how to force Websphere to use Cglib instead of JdkProxy?