Configuration for Jetty (all versions)
There are 2 main steps for enabling primrose to run within Jetty.
Install jar file
Copy primrose.jar into Jetty's user lib directory (eg JETTY_HOME/lib)
Configure jetty.xml to load primrose:
Under the mainConfiguretag in jetty.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) :
Make sure that the primroseConfigFile exists, and is configured correctly (see primroseConfig.html).<!-- Define a a factory to load all pools configured in the primrose config --> <New class="uk.org.primrose.jetty.PrimroseDataSourceFactory"> <Set name="primroseConfigFile">/usr/jetty/conf/primrose.config</Set> </New>
-
Define an webconsole to provide web access to all pools (optional)
Make sure that the logFile directory exists, and can be written to by jetty.<!-- Define a webconsole to provide web access to all pools (optional) --> <New class="uk.org.primrose.vendor.jetty.WebConsoleFactory"> <Set name="username">admin</Set> <Set name="password">admin</Set> <Set name="port">8090</Set> <Set name="logFile">/usr/jetty/logs/wbconsole.log</Set> <Set name="logLevel">verbose,info,warn,error,crisis</Set> </New>
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.
-


