Results 1 to 2 of 2

Thread: Problems with session scope beans

  1. #1
    Join Date
    Jul 2007
    Posts
    1

    Default Problems with session scope beans

    Hi to all!
    First of all thanks for having such a great framework. I've been using it for a while now and it stands great!

    Now for the problem, I'm currently using Echo2 framework in conjunction with Spring, and I've migrated now to Spring 2.0.

    Basically I wanted to have a windowpane that was a session scope bean, so I could call that same object and it returned the same reference.

    In order to use a session scope bean in spring, one has to use AOP proxy, normally from CGLIB. The definition is the following:

    Code:
    <bean id="reportWindowPane" class="ikon.webapp.echo.dialogs.ReportWindowPane" scope="session" lazy-init="false">
            <property name="messageSource" ref="messageSource"/>
            <property name="reportIdentificationColumn" ref="reportIdentificationColumn"/>
            <property name="reportCreationTabPane" ref="reportCreationTabPane"/>
            <property name="reportStartEndColumn" ref="reportStartEndColumn"/>
            <aop:scoped-proxy/>
        </bean>
    My ReportWindowPane class implements InitializingBean, meaning that he will call afterPropertiesSet() method to initialize the components.

    I've debbuged the afterPropertiesSet method and he goes there and initializes everything ok. Every bean (reportIdentificationColumn, reportCreationTabPane and reportStartEndColumn) is well initialize.

    The thing happens that although he shows the windowPane, it has no content even though I'm adding it's content.

    Now from what I see from the debugger he has some kind of lazy init going on there. Each variable is null until I call the getter, something that never happened for singleton or prototype scope beans.

    Is there something more I have to do?

    Thanks and again congrats on such good framework!

  2. #2
    Join Date
    Jan 2006
    Location
    Cambridge, UK
    Posts
    1,340

    Default

    Hi,

    I think you maybe took the wrong forum? This forum is about Spring.NET. Please try the Spring/Java forums

    cheers,
    Erich

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •