> From: Ricardo Trindade [mailto:[EMAIL PROTECTED]]
> 
> thanks. but I still wonder how to get it in the first place...

ComponentSelector selector = (ComponentSelector)
manager.lookup(DataSourceComponent.ROLE + "Selector");

DataSourceComponent datasource = (DataSourceComponent)
selector.select("poolname");

java.sql.Connection connection = datasource.getConnection();



Vadim


> 
> -----Original Message-----
> From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
> Sent: quarta-feira, 12 de Junho de 2002 14:05
> To: [EMAIL PROTECTED]
> Subject: RE: using pooled connection inside action or reader
> 
> 
> > From: Ricardo Trindade [mailto:[EMAIL PROTECTED]]
> >
> > Hi,
> >
> >     I'm about to write an action or a reader (or both). They will be
> used to
> > generate reports with the JasperReports tool.
> >
> >     To be able to use this tool, I have to pass it a connection to
> my
> > datasource.
> >     I was wondering if I will be able (inside the reader or action
> code) to
> > pass it one of the pooled connectios, and if so, if that would be a
> good
> > aproach.
> >
> >     Would there be a problem, for example, if jasper closed the
> connection ?
> 
> close() on database connection will just return it to the pool. This
> call is mandatory for all connections taken from the pool.
> 
> Vadim
> 
> >
> > thanks
> > Ricardo Trindade
> >
> >
> >
---------------------------------------------------------------------
> > Please check that your question  has not already been answered in
the
> > FAQ before posting.
<http://xml.apache.org/cocoon/faq/index.html>
> >
> > To unsubscribe, e-mail:
<[EMAIL PROTECTED]>
> > For additional commands, e-mail:
<[EMAIL PROTECTED]>
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
> 
> 
> 
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
> 
> To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to