Configuration for Resin (version 3)

   Resin website

There are 2 main steps for enabling primrose to run within Resin.

  1. Install jar file

    Copy primrose.jar into Resin's user lib directory (eg RESIN_HOME/lib)

  2. Configure resin.conf to load primrose:

    Under the main resin tag in resin.conf, define a pool, and a web console. There are two sections to add :
    • Define a pool or two to be loaded

      Note that you only require a single primrose.config file, yet each pool must be configured in resin.conf in order for Resin to load them.
      	<!-- Define a pool called 'examplePool' -->
      	<resource jndi-name="java:comp/env/examplePool">
      	  <type>uk.org.primrose.vendor.resin.PrimroseDataSource</type>
      	  <init>
      	  	<poolName>examplePool</poolName>
      	  	<primroseConfigFile>/usr/resin/conf/primrose.config</primroseConfigFile>
      	  </init>
      	</resource>
      
      	<!-- Define a pool called 'anotherPool' -->
      	<resource jndi-name="java:comp/env/anotherPool">
      	  <type>uk.org.primrose.vendor.resin.PrimroseDataSource</type>
      	  <init>
      	  	<poolName>anotherPool</poolName>
      	  	<primroseConfigFile>/usr/resin/conf/primrose.config</primroseConfigFile>
      	  </init>
      	</resource>
      				
      Make sure that the primroseConfigFile exists, and is configured correctly (see primroseConfig.html).

    • Define an webconsole to provide web access to all pools (optional)

      	<!-- Define a webconsole to provide web access to all pools (optional) -->
      	<resource>
      	  <type>uk.org.primrose.vendor.resin.WebConsoleFactory</type>
      	  <init>
      		<username>admin</username>
      		<password>admin</password>
      	  	<port>8090</port>
      	  	<logFile>/usr/resin/logs/wbconsole.log</logFile>
      	  	<logLevel>verbose,info,warn,error,crisis</logLevel>
      	  </init>
      	</resource>
      
      				
      Make sure that the logFile directory exists, and can be written to by resin.
      Also make sure that the port is available.
      You may password protect the webconsole - if you not wish to, then just leave out the username and password elements.

Resin should now be configured successfully to run primrose.