Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

RE: Datasource - OK in app context - Fails in Global context

Altankov Peter

2004-01-12


Hi
> From: Antonio Fiol Bonnin [mailto:fiol.bonnin@(protected)]
> Sent: 11 Януари 2004 г. 11:39
> Subject: Re: Datasource - OK in app context - Fails in Global context
>
>
> So, could someone summarize for me the different ways of
> creating a JDBC
> DataSource in Tomcat?
>
> I will start the summary, so that it's easier to correct/complete.
> Please fill in the gaps ;-)
>
> 1. Have the DataSource defined in your application's context.
>   That way, if you have two apps, you have to copy the datasource
> definition from one to the other.
>   Two connection pools will be created.

If the database schema is different for each your of you applications you will end up using this setup anyway, so just go for that.

> 3. Have the DataSource defined in GlobalNamingResources.
>   If you have two apps, you need to ResourceLink in both contexts.
>   ... connection pool(s) will be created.

This setup suit the case, when your applications all use the same database schema (means can access their database objects trough the same authentication/db user). Ofcourse only 1 pool will be created, so you'll have to scale the pool parameters for all the applications that use it.

Hope this is usefull

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.