Saturday, July 31, 2010

? Resin with MySQL as DB

Type A:
You need to edit the configuration file for Resin - resin.conf; to tell Resin how to access your new MySql databases.


It would be under 
unix        : resin.home/conf
windows  : RESIN_HOME/conf


The configuration file by default defines a database whose JNDI name is jdbc/mysql and which is known by MySql as "test" .




You need to replicate Database part for each database to be created.  


For example, we might define the JNDI name for Application A as  "jdbc/A" . Similarly for Application B, we will have a JNDI entry with name "jdbc/B"


I have used mysql jdbc connector - in that case the driver name would look like "com.mysql.jdbc.Driver" and mysql connector jar will go into resin.home/lib or RESIN_HOME/lib.


restart your resin server. 




Type B
Along with web.xml under WEB-INF folder of your application create a resin-web.xml - with the connection details. In this case your jar will go in the lib folder or your application.







No comments:

Post a Comment