PDA

View Full Version : [java/mysql/struts/tomcat] Come gestire il db


Redvex
17-05-2008, 12:21
Salve a tutti.
Abbiamo configurato tomcat (con il context.xml)
<Resource name="jdbc/TestDB" auth="Container"
type="javax.sql.DataSource" maxActive="100"
maxIdle="30" maxWait="10000" username="javauser"
password="javadude"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>

E inserito nel web.xml dell'applicazione
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/TestDB</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
E' corretto?

Qualcuno puņ illustrarci un esempio da tener presente utilizzando il pattern proxy?