Configuration for all JBoss versions 3 and above

   JBoss website

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

  1. Install jar file

    Copy primrose.jar into JBoss's user lib directory (eg JBOSS_HOME/server/default/lib)

  2. Configure your JBoss config (eg jboss-service.xml) to load primrose:

    Under the server tag in your JBoss config (eg jboss-service.xml), define a pool, and a web console. There are two sections to add :
    • Define the pools to be loaded (all pools in the primrose config file will be loaded)

      	<!-- Define a a factory to load all pools configured in the primrose config -->
      	<mbean 	code="uk.org.primrose.vendor.jboss.PrimroseBinding"
      		name="primrose.binding:service=PrimroseBinding">
      
      		<attribute name="PrimroseConfigFile">/usr/jboss/server/default/conf/primrose.config</attribute>
      
      		<depends>jboss:service=Naming</depends>
      	</mbean>
      
      
      
      				
      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) -->
      	<mbean 	code="uk.org.primrose.vendor.jboss.PrimroseWebConsoleBinding"
      		name="primrose.binding:service=PrimroseWebConsoleBinding">
      
      
      		<attribute name="Username">admin</attribute>
      		<attribute name="Password">admin</attribute>
      		<attribute name="Port">8090</attribute>
      		<attribute name="LogFile">/usr/jboss/server/default/log/primrose_wconsole.log</attribute>
      		<attribute name="LogLevel">verbose,info,warn,error,crisis</attribute>
      
      		<depends>jboss:service=Naming</depends>
      	</mbean>
      				
      Make sure that the LogFile directory exists, and can be written to by JBoss.
      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.

JBoss should now be configured successfully to run primrose.