tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "muhammed soyer" <muham...@ges.net.tr>
Subject Re: Using JDBC Data source from a business class
Date Mon, 06 Sep 2004 10:06:14 GMT
For my web applications(servlets) I add the following lines  in the
webapp.xml .For my classes what should I do ..These classes is not directly
called from the browser .My JSP files use them ..


<ResourceLink name="jdbc/gp" type="javax.sql.DataSource" global="jdbc/gp"/>
<Resource type="javax.sql.DataSource" description="Oracle Datasource
example" auth="Container" name="jdbc/gp"/>


-ms
----- Original Message ----- 
From: "Peng Tuck Kwok" <pengtuck@gmail.com>
To: "muhammed soyer" <muhammed@ges.net.tr>
Sent: Monday, September 06, 2004 12:11 PM
Subject: Re: Using JDBC Data source from a business class


You should be able to access the datasource from your classes.  You
said earlier you had problems doing so, could you describe the
problems ?


On Mon, 6 Sep 2004 11:31:04 +0300, muhammed soyer <muhammed@ges.net.tr>
wrote:
> Yes they are in my web-inf/classes directory .I use them to do my db jobs
> ..from jsp pages ..
> these classes access db .so I want to make them use Tomcats conneciton
> pooling machanism .
> I can do this from servlets ..
>
> -ms
>
> ----- Original Message -----
> From: "Peng Tuck Kwok" <pengtuck@gmail.com>
> To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> Sent: Monday, September 06, 2004 10:44 AM
> Subject: Re: Using JDBC Data source from a business class
>
> On Mon, 6 Sep 2004 09:12:51 +0300, muhammed soyer <muhammed@ges.net.tr>
> wrote:
>
> > My servlets are using the ds without a problem ..But I have some classes
> which are >POJO classes to make my job easier whie accessing the DB
..these
> classes couldnt use > my JDBC definition ..As I guess its from context
> problems ..But I couldnt solve the >problem
>
> What's the exact problem? You don't exactly say where your POJO
> classes are, so I assume they are in your webapp right, then it should
> be ok.
>
> >
> > What should I do to use tomcat's ds from a POJO class ?
> >
> > thnx
> >
> > -ms
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
> << Bu mail GESNET sunucusu tarafindan virus kontrolunden gecirilmistir.>>
>
>

<< Bu mail GESNET sunucusu tarafindan virus kontrolunden gecirilmistir.>>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message