struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vic Cekvenich <cekvenich....@portalvu.com>
Subject Re: Problem with PostgreSQL data source
Date Sun, 03 Oct 2004 21:06:58 GMT

// <bonus j2ee security info
     <Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"

              driverName="org.postgresql.Driver"

	     connectionURL="jdbc:postgresql://localhost:5432/bp?autoReconnect=true"

	  connectionName="bpuser" connectionPassword="changeme"

	  		userTable	="usr" userNameCol="real_email_id" userCredCol="passwrd"

           userRoleTable	="usr" roleNameCol="role_code" />

          // end bounus, here is what you asked for. I found this on 
tomcat site w/ no problems, but this is my seetings. I also use Resin a 
lot, that is a bit different, I do not think anyone lines dbcp.



<Context path="" docBase="c:/jasic/bPproj/bP"

	debug="0"

	reloadable="true" crossContext="true">



<Resource name="bppool" auth="Container" type="javax.sql.DataSource"/>

<ResourceParams name="bppool">



<parameter><name>url</name>

	<value>jdbc:postgresql://localhost:5432/bp?autoReconnect=true</value> 
</parameter>

	<parameter>  <name>driverClassName</name> 
<value>org.postgresql.Driver</value> </parameter>

	<parameter>  <name>maxIdle</name>		<value>3</value>	</parameter>

	<parameter>  <name>username</name> 	<value>bpuser</value> 
   </parameter>

	<parameter>  <name>maxWait</name>        <value>5000</value>

</parameter>

	<parameter>  <name>maxActive</name>       <value>10</value>

</parameter>

	<parameter>  <name>password</name>      	<value>changeme</value>

</parameter>

	<parameter>  <name>removeAbandoned</name>     <value>true</value>

</parameter>

	<parameter>  <name>removeAbandonedTimeout</name> 
<value>20</value></parameter>

</ResourceParams>

</Context>

hth,
.V


Kyle Korndoerfer wrote:
>>1. You should use the Container (Tomat and not Struts) data source
>>and not use connection pool, rather the DataSourcePool that comes
> 
> with
> 
>>JDBC drivers. Connections are more for clients and PooledDataSource
>>is for servers, so use that part of any JDBC driver.
> 
>  
> OK, can you show me what the configuration should look like?
> 
>
>>pgSQL rocks!
> 
> 
> I agree, which is why I really want to get this working! Thanks for the
> help!
> 


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


Mime
View raw message