You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Erik Johansson <er...@merriweather.se> on 2006/08/08 17:31:54 UTC

hivemind wireing

Hi,

Im trying to wire my visit object, which implements 
javax.servlet.http.SessionBindingListener, together with my 
SessionManager so that when the visit object is detached the visit 
object will be notified which in turn notifies the SessionManager which 
will do some logout procedures.

My problem is that I cant figure out how to use the sessionManager  
(defined  in the contribution part) in the SessionStoreFactory
Below is a part of my hivemodule.xml.

<contribution configuration-id="tapestry.state.ApplicationObjects">
         <state-object name="sessionManager" scope="application">
            <invoke-factory object="service:SessionManagerFactory"/>
        </state-object>

        <state-object name="sessionStore" scope="session">
            <invoke-factory object="service:SessionStoreFactory"/>
        </state-object>
</contribution>

    <service-point id="ConnectionPool">
        <create-instance class="com.acme.db.ConnectionPool"/>
    </service-point>
   
    <service-point id="SessionManagerFactory" 
interface="org.apache.tapestry.engine.state.StateObjectFactory">
        <invoke-factory>
            <construct class="com.acme.db.factory.SessionManagerFactory">
                <set-object property="connectionPool" 
value="service:ConnectionPool"/>
            </construct>
        </invoke-factory>
    </service-point>   

    <service-point id="SessionStoreFactory" 
interface="org.apache.tapestry.engine.state.StateObjectFactory">
        <invoke-factory>
            <construct class="com.acme.SessionStoreFactory">
                <set-object property="sessionManager" 
value="???:sessionManager"/>
            </construct>
        </invoke-factory>
    </service-point>

or is there a better way of catching session detachments?

-erik

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org