Monday, 28 March 2016

How to customize services ?


Customizing services

Configuration parameters for services follow a strict naming convention : a service XX will be configured via a set of properties : 
jonas.service.XX.foo  something
jonas.service.XX.bar  else

Each service XX must contain the property jonas.service.XX.class indicating the name of the java class that implements the service : 
jonas.service.XX.class aa.bb.XXImpl

This allow experimented user to replace built-in service by an alternative implementation.

Example
For example, here is the part of jonas.properties file related to the customization of the jtm service
############ JOnAS JTM Transaction service configuration
# Set the name of the implementation class of the jtm service
jonas.service.jtm.class   org.ow2.jonas.tm.jotm.JOTMTransactionService

# Set the Transaction Manager launching mode.
# If set to 'true', TM is remote: TM must be already launched in an other JVM.
# If set to 'false', TM is local: TM is going to run into the same JVM than the jonas Server.
jonas.service.jtm.remote   false

# Set the default transaction timeout, in seconds.
jonas.service.jtm.timeout    60

No comments:

Post a Comment

Note: only a member of this blog may post a comment.