cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tuomo L <tleso...@cc.hut.fi>
Subject Re: Storing session data in database
Date Thu, 24 Jun 2004 12:41:05 GMT

Answering to my own question:

It seems that the only way to get data from the session context for saving
it to db, is to use the jxpath input module, by serving it with the
session-context module. This is what i have now in the database
descriptor, and it seems to work ok.

<value name="user" type="int">
  <mode name="jxpath" type="all">
    <parameter>.</parameter>
    <from-parameter>authentication/authentication/ID</from-parameter>
    <input-module name="session-context"/>
  </mode>
</value>

The following seems correct, but does NOT work, always storing NULL:

<value name="user" type="int">
  <mode name="session-context" type="all">
    <parameter>authentication/authentication/ID</parameter>
  </mode>
</value>

By looking at the DatabaseAction.java, it seems that this class feeds the
session-context module with the @name attribute, in the case above "user".
Session-context module then looks for "/" -characters in that string, but
finds none and returns null! Of course, the string to process here should
be "authentication/authentication/ID".

When used from sitemap like this <map:parameter name="id"
value="{session-context:authentication/authentication/ID"/> the behaviour
is normal.

So, I would imagine, the problem lies in DatabaseAction.java.

Anyway, my workaround was to use the jxpath module.

-Tuomo


On Wed, 23 Jun 2004, Tuomo L wrote:

> Hi,
>
> Could someone please confirm, is there an issue with saving session
> context data in database using the modular DatabaseAddAction ? I cannot
> get this to function.
>
> My earlier post from april:
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=108080945007607&w=2
>
> Cocoon 2.1.5.
>
> Thanks in advance,
> Tuomo
>

Mime
View raw message