setup data source in resin 2.x
Replace "theUserName" to the username relevant to your database, and "thePassword" to the password for the account you set up. Refer to the documentation of your database for details on this. In resin you do this by editing resin.conf and adding the following under <caucho.com>:
<resource-ref>
  <res-ref-name>jdbc/SKForumDS</res-ref-name>
  <res-type>javax.sql.DataSource</res-type>
  <init-param driver-name="org.gjt.mm.mysql.Driver"/>
  <init-param url="jdbc:mysql://localhost/forum"/>
  <init-param user="theUserName"/>
  <init-param password="thePassword"/>
  <init-param max-connections="10"/>
  <init-param max-idle-time="1h"/>
  <init-param max-active-time="1m" />
</resource-ref>

<resource-ref>
  <res-ref-name>jdbc/SiloDS</res-ref-name>
  <res-type>javax.sql.DataSource</res-type>
  <init-param driver-name="org.gjt.mm.mysql.Driver"/>
  <init-param url="jdbc:mysql://localhost/forum"/>
  <init-param user="theUserName"/>
  <init-param password="thePassword"/>
  <init-param max-connections="5"/>
  <init-param max-idle-time="1h"/>
  <init-param max-active-time="1m" />
</resource-ref>
and adding the mysql jdbc driver to resin/lib.
© Copyright 2005 SK Soft  - hosting by killingar.net hosting