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

  • Cglib2AopProxy is not gettting Target in Websphere 8.0

    Hi,
    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="com.myproject.services.Session"
    scope="session">
    <aop:scoped-proxy />
    </bean>

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

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

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

    Issue:
    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,
    Anantha

  • #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,
    Anantha

    Comment


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

      Comment

      Working...
      X