cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bart Molenkamp" <b.molenk...@bizzdesign.nl>
Subject RE: Database connection from custom Authenticator class
Date Tue, 21 Sep 2004 12:27:00 GMT
Do a lookup with a service manager:

manager.lookup(org.apache.avalon.excalibur.datasource.DataSourceComponen
t.ROLE + "Selector");

Use the selector to select the data source, which is an instance of
DataSourceComponent. Use getConnection() to get the database connection.

Bart.

> -----Original Message-----
> From: Martin Rusnak [mailto:mafo@cyberspace.sk]
> Sent: Tuesday, September 21, 2004 2:21 PM
> To: users@cocoon.apache.org
> Subject: Database connection from custom Authenticator class
> 
> Dear All,
> 
> I use my own authenticator class which implements interface:
> 
> org.apache.cocoon.webapps.authentication.components.Authenticator
> 
> I configured it as it is described in the documentation. Here is the
> handler configuration:
> 
> <handler name="portalhandler">
>      <redirect-to uri="cocoon:/sunspotdemoportal"/>
>      <authentication authenticator="mypkg.MyAuthenticator"/>
> </handler>
> 
> I want to do custom database query to verify the user credentials,
> but I dont know how to obtain the database connection from the pool.
> 
> Martin
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org


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


Mime
View raw message