= Bedework and Jboss =
Note that adding services to jboss is not too difficult. However, one useful rule is fix the first error that occurs. A useful rule for all development but particularly here. Jboss will run into all sorts of problems if, for example, a deployment is not completely successful. As an example, a missing dependency may cause a service to deploy before resources are available. Redeployment later on may fail because the failed deployment does not get undeployed successfully. Shut down jboss, fix the dependency problem, then restart. It takes longer than just trying to redeploy but is usually quicker in the long run.
The goal of getting bedework deployed in jboss is to have a single server to start. Currently we have all bedework components incorporated in jboss. This makes for a much easier deployment of bedework at those sites that have little IT expertise (or just no time to repackage).
JBoss does not arrive with activemq so we need to integrate that service. Instructions follow.
We then show for reference how we add the indexer, sysevents logger and group scheduler processes. The timezone service and carddav wil be deployed. Finally the bulk of bedework (as it stands at present) will be deployed as a single ear.
== Work to be done ==
[wiki:JbossConfig/jboss6 Notes for jboss 6]
=== Make jboss 5 production ready ===
* Ensure any unnecessary debugging message are off
* Integrate activeMQ - instructions at [wiki:JbossConfig/integrateActivemq Integrating activemq in jboss]
* Use derby instead of hypersonic for jboss DefaultDS - [wiki:JbossConfig/defaultDS change DefaultDS]
* Switch authentication to directory service and secure consoles - see [wiki:JbossConfig/Authentication Jboss Authentication]
* [wiki:JbossConfig/LibrariesClassloaders Libraries and classloaders]
* Changes to logging - see [wiki:JbossConfig/Logging Jboss Logging
* Embed a directory server - [wiki:JbossConfig/embedOpenDS embedded openDS]
* Bind to any address, change ports etc. - [wiki:JbossConfig/bindAndPorts bind and ports]
* Perhaps remove any unused modules
=== Add bedework components ===
* Use derby for bedework [wiki:JbossConfig/DerbyForBedework Derby for bedework] - also mentions some general derby issues
* Make dump/restore and schema creation into mbean
* add bedework directory to jboss data directory
* add dumprestore directory to bedework data directory
* Make indexer into an mbean - an example, to follow at [wiki:JbossConfig/indexerMBean Indexer mbean in jboss]
* Ensure ear is built correctly and deploys
* make sysevents logger into mbean - instructions at [wiki:JbossConfig/sysEventsLogger Bedework system events logger in jboss]
* make scheduling processor into mbean
=== Extras ===
* Rework bedework options so that they can use system properties - in particular a base directory for indexes
* Rework bedework options as some sort of mbean
* Use timed services to fire off data dumps etc - [wiki:JbossConfig/timedServices timed servcies in jboss]
== Small bug fix ==
In conf/bootstrap/profile.xml there is a small bug fix to be applied or jboss will not start on Solaris
{{{
-
+
}}}
== Some connection debugging messages ==
Turn this off or you'll see
{{{
[CachedConnectionManager] Closing a connection for you. Please close them yourself
}}}
In deploy/jca-jboss-beans.xml set debug to false
{{{
@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.jca:service=CachedConnectionManager", exposedInterface=org.jboss.resource.connectionmanager.CachedConnectionManagerMBean.class)
false
}}}
== Hibernate cache config ==
{{{
12:57:12,429 WARN [ReadWriteCache] An item was expired by the cache while it was locked (increase your cache timeout): org.bedework.calfacade.BwCollectionLastmod#131077
}}}
== JBoss data directory ==
We should place our data files under a single directory inside the jboss data directory. This is referenced by the value "${jboss.server.data.dir}" which can be used in the configuration files.
We will create server/XXX/data/bedework and server/XXX/data/bedework/dumprestore
== JBoss bedework deploy directory ==
We should deploy into a single directory inside the jboss configuration and leave the jboss deploy directory for jboss services and web applications. We will create a new directory server/default/bwdeploy.
To configure jboss to use this directory update server/default/conf/bootstrap/profile.xml. Look for the section (near the start)
{{{
${jboss.server.home.url}deploy
}}}
and add our directory
{{{
${jboss.server.home.url}deploy
${jboss.server.home.url}bwdeploy
}}}
We will create server/XXX/data/bedework and server/XXX/data/bedework/dumprestore
----
= References =
== Building a service ==
Something here: http://www.jboss.org/files/jbossmc/docs/2.0.x/userGuide/ch03.html
== Defining the structure ==
http://www.jboss.org/files/jbossmc/docs/2.0.x/userGuide/ch21s04.html
== Setting logging level ==
JBoss uses a system property to define the log level.
== Add dependencies ==
Example here http://community.jboss.org/wiki/SERVICEdotXML - use one out of the activemq integration. activemq-jms-ds.xml has a dependency.
{{{
jboss.jca:service=RARDeployment,name='activemq-rar-5.3.0.rar'
}}}