JBoss
Starting version 1.0, Penrose can be installed as JBoss service.
Deployment
Make sure Ant is installed. To deploy Penrose go to PENROSE_SERVER_HOME/samples/jboss, execute:
ant deploy
This command will generate penrose.sar in this directory and will copy this file into JBoss' deployment directory. To undeploy Penrose:
ant undeploy
The default deployment directory is JBOSS_HOME/server/default/deploy directory. If JBoss is installed in a different directory, you can overwrite the jboss.home property. If you want to deploy it into a different JBoss server, you can overwrite the jboss.server property. See the following example:
ant -Djboss.home=/usr/local/jboss -Djboss.server=default deploy
Note: The penrose.sar file does not include any Penrose configuration files. Penrose service will still read the configuration files in PENROSE_SERVER_HOME.
Logging
The logging configuration for JBoss can be found in JBOSS_HOME/server/default/conf/log4j.xml. To configure logging for Penrose, add the following:
<appender name="CONSOLE2" class="org.apache.log4j.ConsoleAppender"> <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/> <param name="Target" value="System.out"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%-20C{1} [%4L] %m%n"/> </layout> </appender> <category name="org.safehaus.penrose" additivity="false"> <priority value="DEBUG"/> <appender-ref ref="CONSOLE2"/> </category>
The default log4j.xml includes the following section:
<category name="org.apache"> <priority value="INFO"/> </category>
This setting unfortunately leads to a lot of unnecessary information to be printed on screen. To reduce the logging message add the following section:
<category name="org.apache.directory"> <priority value="WARN"/> </category>
JMX Console
Penrose service can be managed via JBoss' JMX Console. Go to http://localhost:8080/jmx-console/, the MBeans will be available under Penrose domain.
Diagram
