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:[EMAIL PROTECTED] > Sent: Tuesday, September 21, 2004 2:21 PM > To: [EMAIL PROTECTED] > 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
