You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Craig Tataryn <cr...@hotmail.com> on 2002/09/06 17:12:18 UTC

Re: [REQUEST API UPDATE] RES: Datasource Retrieval in 1.1 (Help needed)

Thanks!  Not sure why I didn't see that before!

Perhaps someone could update the API docs for findDataSource() so it directs 
the user to this function instead.

Thanks again!

Craig.

>From: "julio" <ju...@softsite.com.br>
>Reply-To: "Struts Users Mailing List" <st...@jakarta.apache.org>
>To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
>Subject: RES: Datasource Retrieval in 1.1 (Help needed)
>Date: Fri, 6 Sep 2002 12:07:52 -0300
>
>Hi Craig,
>
>This question was already answered, look for the subject "Connection
>Pool Question"(15/08/2002). Anyway, the code...
>
>"
>Then, in your action, you can access your datasource via:
>execute(......)
>{
>DataSource ds = this.getDataSource(request);
>}
>...
>...
>"
>
>________________________________
>Julio Cesar
>Softsite Tecnologia Ltda
>http://www.softsite.com.br
>Fortaleza, CE, Brasil
>
>-----Mensagem original-----
>De: Craig Tataryn [mailto:craiger316@hotmail.com]
>Enviada em: sexta-feira, 6 de setembro de 2002 11:47
>Para: struts-user@jakarta.apache.org
>Assunto: Re: Datasource Retrieval in 1.1 (Help needed)
>
>>From ActionServlet.findDatasource() API docs:
>Deprecated. Look up data sources directly in servlet context attributes
>
>So I replaced my call to :
>dataSource = getServlet().findDatasource(null);
>
>with:
>dataSource =
>(DataSource)getServlet().getServletContext().getAttribute(this.DATA_SOUR
>CE_KEY);
>
>And my datasource is retuned as null.
>
>Anyone know what's going on?
>
>Craig.
>
> >From: "Craig Tataryn" <cr...@hotmail.com>
> >Reply-To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> >To: struts-user@jakarta.apache.org
> >Subject: Re: Datasource Retrieval in 1.1
> >Date: Thu, 05 Sep 2002 14:09:35 -0500
> >
> >Ok, read the DTD for struts-config.xml and figured out that I would use
>the
> >"key" attribute if I were to add another datasource.  I would still
>like to
> >know how to retrieve the datasource without using the deprecated
> >findDatasource() method.
> >
> >Thanks,
> >
> >Craig.
> >
> >
> >>From: "Craig Tataryn" <cr...@hotmail.com>
> >>Reply-To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> >>To: struts-user@jakarta.apache.org
> >>Subject: Datasource Retrieval in 1.1
> >>Date: Thu, 05 Sep 2002 11:30:39 -0500
> >>
> >>The documentation still lists the old way of how to retrieve a
>datasource
> >>which has been setup in struts-config.xml using findDatasource();
> >>
> >>The API says to "use datasource stored in attributes".  Can someone
>give
> >>an example of how I might do this from within my execute method?  I
>want
> >>to get rid of my deprecation warnings for findDatasource()
> >>
> >>As well, I believe you can have multiple datasources setup in
> >>struts-config.xml.  The default datasource being keyed by
> >>org.apache.struts.action.Action.DATA_SOURCE_KEY.  Could someone point
>me
> >>to an example of multiple datasources and how to setup keys for each?
> >>
> >>Thanks,
> >>
> >>Craig.
> >>
> >>Craig W. Tataryn
> >>Programmer/Analyst
> >>Compuware
> >>
> >>_________________________________________________________________
> >>Join the world's largest e-mail service with MSN Hotmail.
> >>http://www.hotmail.com
> >>
> >>
> >>--
> >>To unsubscribe, e-mail:
> >><ma...@jakarta.apache.org>
> >>For additional commands, e-mail:
> >><ma...@jakarta.apache.org>
> >
> >
> >Craig W. Tataryn
> >Programmer/Analyst
> >Compuware
> >
> >_________________________________________________________________
> >MSN Photos is the easiest way to share and print your photos:
> >http://photos.msn.com/support/worldwide.aspx
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><ma...@jakarta.apache.org>
> >For additional commands, e-mail:
> ><ma...@jakarta.apache.org>
>
>
>Craig W. Tataryn
>Programmer/Analyst
>Compuware
>
>_________________________________________________________________
>Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
>
>--
>To unsubscribe, e-mail:
><ma...@jakarta.apache.org>
>For additional commands, e-mail:
><ma...@jakarta.apache.org>
>
>
>
>
>--
>To unsubscribe, e-mail:   
><ma...@jakarta.apache.org>
>For additional commands, e-mail: 
><ma...@jakarta.apache.org>


Craig W. Tataryn
Programmer/Analyst
Compuware

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>