1. implement a scope manager
(implementing StateObjectPersistenceManager )

look at ApplicationScopeManager for example.

in your implementation, use ehcache to store the objects.

configure ehcache

http://ehcache.sourceforge.net/

configure the new scope as singletone service in hivemind:

<service-point id="MyScopeManager"
interface="org.apache.tapestry.engine.state.StateObjectPersistenceManager">
                <invoke-factory model="singleton" >
                     <construct class="MyScopeManager" >
                     </construct>
                </invoke-factory>
        </service-point>

2. configure the new scope

<contribution configuration-id="tapestry.state.StateObjectPersistenceManagers">
                <manager scope="request" object="service:MyScopeManager"/>
        </contribution>


3. create state objects:

see here:
http://jakarta.apache.org/tapestry/UsersGuide/state.html#state.aso.defining

4. use it.

http://jakarta.apache.org/tapestry/UsersGuide/state.html#state.aso.defining

5. make a nice wiki page on the tapestry wiki which documents the process, so that others can benefit from it.

Cheers,
Ron

Raul Raja Martinez wrote:
Could you point me in some direction or url where I can see an example?

thanks for the quick answer Ron.

Raul.

Ron Piterman wrote:

I wouldn't use them as ASO but create a factory service which uses ehcache.
Cheers,
Ron


Raul Raja Martinez wrote:

I have a couple of ASO's that I would like to reload automatically every 15 min, I was wondering what is the best approach for doing so in tapestry.

best regards.

Raul Raja.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to