You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Grzegorz Tańczyk <go...@polzone.pl> on 2005/01/12 20:57:42 UTC

HttpSessionListener and DataSourceComponent

Hello,

  I've lost in Cocoon/Servlet architecture. How can I access
  datasource defined in cocoon.xconf in my sessionlistener defined in
  web.xml? I would like to make some DB modifications if session
  expires. I don't see that SessionListener could be connected to any
  manager, so standard method of obtaining datasource connection is unsuitable
  here?
  

-- 
Best regards,
 Grzegorz                          mailto:goliatus@polzone.pl


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


Re: HttpSessionListener and DataSourceComponent

Posted by Leszek Gawron <lg...@mobilebox.pl>.
Grzegorz Tańczyk wrote:
> Hello,
> 
>   I've lost in Cocoon/Servlet architecture. How can I access
>   datasource defined in cocoon.xconf in my sessionlistener defined in
>   web.xml? I would like to make some DB modifications if session
>   expires. I don't see that SessionListener could be connected to any
>   manager, so standard method of obtaining datasource connection is unsuitable
>   here?
>   
> 
no way ... without a hack. You can write a component that exposes the 
datasource via a static lookup method - but that's really ugly.


-- 
Leszek Gawron                                      lgawron@mobilebox.pl
Project Manager                                    MobileBox sp. z o.o.
+48 (61) 855 06 67                              http://www.mobilebox.pl
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

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