On 11/15/2012 11:45 AM, DIA Modou wrote:
> hi,
>
> I'm working with coocon 2.1 and tomcat 6.0.32.
>
> I have a code which permit to use an xml file as a global variable. I
> build that with a "component instance" and the package
> "org.apache.cocoon.components.modules.input.XMLFileModule" like this:
>
>
> <component-instance
>   class="org.apache.cocoon.components.modules.input.XMLFileModule"
>   logger="core.modules.input"
>   name="userinfos-xml">
>
>   <file
>     src="cocoon://auth/userinfos.xml"
>     reloadable="true"
>     cacheable="true"
>     cache-expressions="false" />
>
> </component-instance>
>
>
>
> In my "pipelines", i use "userinfos-xml" like this:
>
>
> <map:match type="regexp" pattern="something.html">
>   <map:generate type="xsp" src="something.xsp">
>     <map:parameter
>       name="role"
>       value="{userinfos-xml:/userinfos/authentication/roles}" />
>   </map:generate>
>   ...
> </map:match>
>
>
> When a user is logged the function "cocoon://auth/userinfos.xml" return
> his informations of session ("id", "groups", ...) as an xml file. If
> user isn't logged, the result is an empty xml file. 
>
> My problem is after some hours (~ 8hours) without restarting the
> "tomcat" server, the variable "userinfos-xml" is empty even if the user
> is logged.
>
> I tried to remove the cache with this configuration:
>
>
>   <file
>     src="cocoon://auth/userinfos.xml"
>     reloadable="false"
>     cacheable="false"
>     cache-expressions="false" />
>
>
> but, the problem is always persistant. I think that the component
> instance isn't updated anymore after some hours
>
>
> thanks for your helps.

Hmm, that sounds like a session timeout.

You can validate to set a really short session timeout on your app and
on tomcat and see if the problem occur after the session expires.

The question is how you create the cocoon://auth/userinfos.xml file:
- business logic: do you connect to servlet session to get the user data
- whether you set some caching in the pipe so it happens to expire after
8 hours
- ...

salu2

-- 
Thorsten Scherler <scherler.at.gmail.com>
codeBusters S.L. - web based systems
<consulting, training and solutions>

http://www.codebusters.es/


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to