tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edoardo Panfili <edoa...@aspix.it>
Subject Re: Postgresql and JNDI Datasource
Date Tue, 24 Jan 2006 22:02:37 GMT
torben ha scritto:
> I am trying to define a global JDBC datasource, where the database is 
> Postgresql (version 7.3) ni Tomcat version 5.5.15.
>
> I have strictly followed the example in 
> http://tomcat.apache.org/tomcat-5.5-doc/jndi-datasource-examples-howto.html, 
>
> but it does not work if I define the datasource in 
> $CATALINA_HOME/conf/server.xml.
>
> However if I define the datasource in the application 
> META-INF/context.xml, it is working.
>
> I would prefer to define the datasource in 
> $CATALINA_HOME/conf/server.xml. Has somebody succeded in doing that ? 
> And if yes, how ?
>
>
> Torben Frøberg
>
this is my configuration:
now I am using postgres 8.1 but it is the same configuration for my old 
configuration (1 month ago) with postgres 7.4

server.xml------------------------------------------
        <Context path="/lisy" docBase="lisy" debug="5" reloadable="true">
                <Resource name="jdbc/lisy" auth="Container" 
type="javax.sql.DataSource"
                        maxActive="8" maxIdle="5" maxWait="10000"
                        username="uname" password="pwd" 
driverClassName="org.postgresql.Driver"
                        url="jdbc:postgresql://127.0.0.1:5432/lisy"
                        removeAbandoned="true"
                        removeAbandonedTimeout="30"
                        logAbandoned="true"
                />

        </Context>
web-xml------------------------------------------------
        <resource-ref>
                <description>postgreSQL Datasource</description>
                <res-ref-name>jdbc/lisy</res-ref-name>
                <res-type>javax.sql.DataSource</res-type>
                <res-auth>Container</res-auth>
        </resource-ref>


I hope that this can help you

-- 
edoardo@aspix.it
AIM: edoardopn 
Jabber: edoardopa@talk.google.com
tel:075 9142766


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


Mime
View raw message