You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by DIA Modou <md...@ajlsm.com> on 2012/11/15 11:45:06 UTC
Update probleme with component instance and XMLFileModule package
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.
--
-------------------
| Modou DIA,
| ajlsm
-------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Update probleme with component instance and XMLFileModule package
Posted by md...@ajlsm.com.
On Sat, 17 Nov 2012 23:00:34 +0100, Thorsten Scherler
<sc...@gmail.com> wrote:
> 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.
I manage the session timeout on web.xml
(session-config/session-timeout) with a duration of 2mn, all work nice
after a dozen of minutes. I'll tell you if I encounter the same problem
after some hours.
In tomcat except for the "connectionTimeout" in the server.xml file, i
don't know how to configure the duration of an session.
>
> 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
> - ...
The function "cocoon://auth/userinfos.xml" serve via a xsp the contain
of a session variable. That session variable is builded and managed as a
DOM structures with the package "org.apache.cocoon.auth".
I think that the cause of my problem is independant with that function
because when usersinfo-xml is empty, the function usersinfo.xml is still
served correctly.
>
> salu2
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Update probleme with component instance and XMLFileModule package
Posted by Thorsten Scherler <sc...@gmail.com>.
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org