You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rick Col <ri...@yahoo.com> on 2006/02/03 02:06:31 UTC

how to use datasource in a non-tomcat project?

Hi, guys:

I am stuck here with this problem. I created a Java
project on
Eclipse, the reason is I have to use my own framework
that won't
fit into a Tomcat project. But we are using Tomcat to
run our application. Now I have to create datasource
for Hibernate to use. If this is a tomcat project, I
can set up DB2 datasource in Tomcat's server.xml. But
it seems I cannot access this datasource set up in
server.xml and web.xml using Hibernate code or JDBC
code. I am wondering if there is a workaround for
this?

regards,

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: how to use datasource in a non-tomcat project?

Posted by Rick Col <ri...@yahoo.com>.
Thanks, Mark:

Basic datasource is a good resource. This is really
pointing me to the right direction. 

--- Mark Shifman <ma...@yale.edu> wrote:

> You can use jakarta commons dbcp
> http://jakarta.apache.org/commons/dbcp/.
> There is a basic datasource and examples on how to
> create it.
> mas
> 
> Rick Col wrote:
> 
> >Hi, guys:
> >
> >I am stuck here with this problem. I created a Java
> >project on
> >Eclipse, the reason is I have to use my own
> framework
> >that won't
> >fit into a Tomcat project. But we are using Tomcat
> to
> >run our application. Now I have to create
> datasource
> >for Hibernate to use. If this is a tomcat project,
> I
> >can set up DB2 datasource in Tomcat's server.xml.
> But
> >it seems I cannot access this datasource set up in
> >server.xml and web.xml using Hibernate code or JDBC
> >code. I am wondering if there is a workaround for
> >this?
> >
> >regards,
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> >http://mail.yahoo.com 
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> >For additional commands, e-mail:
> users-help@tomcat.apache.org
> >
> >  
> >
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail:
> users-help@tomcat.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: how to use datasource in a non-tomcat project?

Posted by Mark Shifman <ma...@yale.edu>.
You can use jakarta commons dbcp http://jakarta.apache.org/commons/dbcp/.
There is a basic datasource and examples on how to create it.
mas

Rick Col wrote:

>Hi, guys:
>
>I am stuck here with this problem. I created a Java
>project on
>Eclipse, the reason is I have to use my own framework
>that won't
>fit into a Tomcat project. But we are using Tomcat to
>run our application. Now I have to create datasource
>for Hibernate to use. If this is a tomcat project, I
>can set up DB2 datasource in Tomcat's server.xml. But
>it seems I cannot access this datasource set up in
>server.xml and web.xml using Hibernate code or JDBC
>code. I am wondering if there is a workaround for
>this?
>
>regards,
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>For additional commands, e-mail: users-help@tomcat.apache.org
>
>  
>



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