Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Configuring and Running Red Hat JBoss Fuse
Managing the runtime container
Copyright © 2013 Red Hat, Inc. and/or its affiliates.
| Revision History | |
|---|---|
| 08/16/2012 | |
| Moved security, JMX, thread pools, and hot deploy information from the config chapter to independent chapters | |
| 8/30/12 | |
| added chapter on incremental patching | |
| 09/10/12 | |
| added chapter on managing child containers | |
| 9/13/2012 | |
| added chapter on configuring the Fabric Maven proxy | |
| 10/04/2012 | |
| added chapters on joining and creating a fabric | |
| 02/19/2013 | |
| added on deploying a new message broker | |
Abstract
Chapter 1. Configuring the Initial Features in a Standalone Container Copy linkLink copied to clipboard!
Abstract
Overview Copy linkLink copied to clipboard!
etc/org.apache.karaf.features.cfg file to discover the feature URLs (feature repository locations) and to determine which features it will load. By default, Red Hat JBoss Fuse loads a large number of features and you may not need all of them. You may also decide you need features that are not included in the default configuration.
etc/org.apache.karaf.features.cfg are only used the first time the container is started. On subsequent start-ups, the container uses the contents of the InstallDir/data directory to determine what to load. If you need to adjust the features loaded into a container, you can delete the data directory, but this will also destroy any state or persistence information stored by the container.
Modifying the default installed features Copy linkLink copied to clipboard!
Modifying the default set of feature URLs Copy linkLink copied to clipboard!
Chapter 2. Installing Red Hat JBoss Fuse as a Service Copy linkLink copied to clipboard!
| Revision History | |
|---|---|
| 06/01/12 | |
| Red Hat JBoss Fuse can generate a service wrapper that can be easily configured to install Red Hat JBoss Fuse as a system service. | |
Abstract
- Generate the service wrapper for your system.
- Configure the launch script for your system.
- Configure the service wrapper for your system.
- Install the service wrapper as system service.
2.1. Generating the Service Wrapper Copy linkLink copied to clipboard!
Abstract
Overview Copy linkLink copied to clipboard!
wrapper feature generates a wrapper around the JBoss Fuse runtime that allows you to install a message broker as a system service. The wrapper feature does not come preinstalled in the console, so before you can generate the service wrapper you must install the wrapper feature.
Procedure Copy linkLink copied to clipboard!
- Start JBoss Fuse in console mode using the fuse command.
- Once the console is started and the command prompt appears, enter
features:install wrapper.The features:install command will locate the required libraries to provision the wrapper feature and deploy it into the run time. - Generate the wrapper by entering
wrapper:install -n serviceName -d displayName -D description.The wrapper:install command has the options described in Table 2.1, “Wrapper Install Options”.Expand Table 2.1. Wrapper Install Options Option Default Description -sAUTO_START(Windows only) Specifies the mode in which the service is installed. Valid values are AUTO_STARTorDEMAND_START.-nkarafSpecifies the service name that will be used when installing the service. -dSpecifies the display name of the service. -DSpecifies the description of the service.
Generated files Copy linkLink copied to clipboard!
bin\ServiceName-wrapper[.exe]—the executable file for the wrapper.bin\ServiceName-service[.bat]—the script used to install and remove the service.etc\ServiceName-wrapper.conf—the wrapper's configuration file.- Three library files required by the service wrapper:
lib\libwrapper.solib\karaf-wrapper.jarlib\karaf-wrapper-main.jar
2.2. Configure the Script Copy linkLink copied to clipboard!
Abstract
ServiceName-service[.bat] file, is located under the InstallDir/bin/ directory.
Overview Copy linkLink copied to clipboard!
ServiceName-service[.bat] file, as described here.
RUN_AS_USER Copy linkLink copied to clipboard!
RUN_AS_USER variable is set, the ServiceName-service[.bat] script runs as the specified user. For example, to run the script as the user, esbuser, search for the line, #RUN_AS_USER, uncomment the line, and set the variable as follows:
RUN_AS_USER=esbuser
RUN_AS_USER=esbuser
wrapper.log files. Failure to be able to write the log file will cause the Wrapper to exit without any way to write out an error message.
PRIORITY Copy linkLink copied to clipboard!
nice command by setting the PRIORITY variable (it is not set by default).
2.3. Configuring the Wrapper Copy linkLink copied to clipboard!
Abstract
ServiceName-wrapper.conf file, which is located under the InstallDir/etc/ directory.
Overview Copy linkLink copied to clipboard!
ServiceName-wrapper.conf file, which is located under the InstallDir/etc/ directory.
- the default environment settings
- the properties passed to the JVM
- the classpath
- the JMX settings
- the logging settings
Specifying the Red Hat JBoss Fuse's environment Copy linkLink copied to clipboard!
KARAF_HOME—the location of the Red Hat JBoss Fuse install directory.KARAF_BASE—the root directory containing the configuration and OSGi data specific to the broker instance.The configuration for the broker instance is stored in theKARAF_BASE/confdirectory. Other data relating to the OSGi runtime is also stored beneath the base directory.KARAF_DATA—the directory containing the logging and persistence data for the broker.
Example 2.1. Default Environment Settings
set.default.KARAF_HOME=InstallDir set.default.KARAF_BASE=InstallDir set.default.KARAF_DATA=InstallDir\data
set.default.KARAF_HOME=InstallDir
set.default.KARAF_BASE=InstallDir
set.default.KARAF_DATA=InstallDir\data
Passing parameters to the JVM Copy linkLink copied to clipboard!
wrapper.java.additional.<n>. <n> is a sequence number that must be distinct for each parameter.
wrapper.java.additional.<n>=-DPropName=PropValue.
Example 2.2. Default Java System Properties
Adding classpath entries Copy linkLink copied to clipboard!
wrapper.java.classpath.<n>. <n> is a sequence number that must be distinct for each classpath entry.
Example 2.3. Default Wrapper Classpath
wrapper.java.classpath.1=%KARAF_BASE%/lib/karaf-wrapper.jar wrapper.java.classpath.2=%KARAF_HOME%/lib/karaf.jar wrapper.java.classpath.3=%KARAF_HOME%/lib/karaf-jaas-boot.jar wrapper.java.classpath.4=%KARAF_BASE%/lib/karaf-wrapper-main.jar
wrapper.java.classpath.1=%KARAF_BASE%/lib/karaf-wrapper.jar
wrapper.java.classpath.2=%KARAF_HOME%/lib/karaf.jar
wrapper.java.classpath.3=%KARAF_HOME%/lib/karaf-jaas-boot.jar
wrapper.java.classpath.4=%KARAF_BASE%/lib/karaf-wrapper-main.jar
JMX configuration Copy linkLink copied to clipboard!
- Locate the line
# Uncomment to enable jmx.There are three properties, shown in Example 2.4, “Wrapper JMX Properties”, that are used to configure JMX.Example 2.4. Wrapper JMX Properties
# Uncomment to enable jmx #wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616 #wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false #wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=false
# Uncomment to enable jmx #wrapper.java.additional.n=-Dcom.sun.management.jmxremote.port=1616 #wrapper.java.additional.n=-Dcom.sun.management.jmxremote.authenticate=false #wrapper.java.additional.n=-Dcom.sun.management.jmxremote.ssl=falseCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Remove the
#from in front of each of the properties. - Replace the
nin each property to a number that fits into the sequence of addition properties established in the configuration.
Configuring logging Copy linkLink copied to clipboard!
| Property | Description |
|---|---|
wrapper.console.format |
Specifies how the logging information sent to the console is formated. The format consists of the following tokens:
|
wrapper.console.loglevel | Specifies the logging level displayed on the console. |
wrapper.logfile | Specifies the file used to store the log. |
wrapper.logfile.format | Specifies how the logging information sent to the log file is formated. |
wrapper.console.loglevel | Specifies the logging level sent to the log file. |
wrapper.console.maxsize | Specifies the maximum size, in bytes, that the log file can grow to before the log is archived. The default value of 0 disables log rolling. |
wrapper.console.maxfiles | Specifies the maximum number of archived log files which will be allowed before old files are deleted. The default value of 0 implies no limit. |
wrapper.syslog.loglevel | Specifies the logging level for the sys/event log output. |
2.4. Installing and Starting the Service Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
Windows Copy linkLink copied to clipboard!
InstallDir\bin\ServiceName-service.bat install. If you used the default start setting, the service will start when Windows is launched. If you specified DEMAND_START, you will need to start the service manually.
net start "ServiceName". You can also use the Windows service UI.
net stop "ServiceName" You can also use the Windows service UI.
InstallDir\bin\ServiceName-service.bat remove.
Redhat Linux Copy linkLink copied to clipboard!
ln -s InstallDir/bin/ServiceName-service /etc/init.d/ chkconfig ServiceName-service --add chkconfig ServiceName-service on
# ln -s InstallDir/bin/ServiceName-service /etc/init.d/
# chkconfig ServiceName-service --add
# chkconfig ServiceName-service on
service ServiceName-service start.
service ServiceName-service stop.
#service ServiceName-service stop chkconfig ServiceName-service --del rm /etc/init.d/ServiceName-service
#service ServiceName-service stop
# chkconfig ServiceName-service --del
# rm /etc/init.d/ServiceName-service
Ubuntu Linux Copy linkLink copied to clipboard!
ln -s InstallDir/bin/ServiceName-service /etc/init.d/ update-rc.d ServiceName-service defaults
# ln -s InstallDir/bin/ServiceName-service /etc/init.d/
# update-rc.d ServiceName-service defaults
/etc/init.d/ServiceName-service start.
/etc/init.d/ServiceName-service stop.
#/etc/init.d/ServiceName-service stop rm /etc/init.d/ServiceName-service
#/etc/init.d/ServiceName-service stop
# rm /etc/init.d/ServiceName-service
Chapter 3. Basic Security Copy linkLink copied to clipboard!
Abstract
3.1. Configuring Basic Security Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
Before you start the container Copy linkLink copied to clipboard!
Create a secure JAAS user Copy linkLink copied to clipboard!
InstallDir/etc/users.properties file and add a new user field, as follows:
Username=Password,admin
Username=Password,admin
Username and Password are the new user credentials. The admin role gives this user the privileges to access all administration and management functions of the container. For more details about JAAS, see Chapter 15, Configuring JAAS Security.
Configure the Apache ActiveMQ Web console (optional) Copy linkLink copied to clipboard!
InstallDir/etc/system.properties file. Search for the activemq.jmx.user and activemq.jmx.password settings (which are commented out by default), and modify them as follows:
# # Authentication - must match an entry in user.properties with the admin privilege # activemq.jmx.user=Username activemq.jmx.password=Password
#
# Authentication - must match an entry in user.properties with the admin privilege
#
activemq.jmx.user=Username
activemq.jmx.password=Password
Username and Password are the credentials of a JAAS user with admin privileges.
webconsole.jmx.* and webconsole.jms.* properties (in the InstallDir/etc/system.properties file).
Ports exposed by the Red Hat JBoss Fuse container Copy linkLink copied to clipboard!
Figure 3.1. Ports Exposed by the Red Hat JBoss Fuse Container
- Console port—enables remote control of a container instance, through Apache Karaf shell commands. This port is enabled by default and is secured both by JAAS authentication and by SSL.
- JMX port—enables management of the container through the JMX protocol. This port is enabled by default and is secured by JAAS authentication.
- Web console port—provides access to an embedded Jetty container that can host Web console servlets. By default, the Web consoles are not installed in the container.
Enabling the remote console port Copy linkLink copied to clipboard!
- JAAS is configured with at least one set of login credentials.
- The JBoss Fuse runtime has not been started in client mode (client mode disables the remote console port completely).
./client -u Username -p Password
./client -u Username -p Password
Username and Password are the credentials of a JAAS user with admin privileges. For more details, see Chapter 9, Using Remote Connections to Manage a Container.
Strengthening security on the remote console port Copy linkLink copied to clipboard!
- Make sure that the JAAS user credentials have strong passwords.
- Customize the X.509 certificate (replace the Java keystore file,
InstallDir/etc/host.key, with a custom key pair).
Enabling the JMX port Copy linkLink copied to clipboard!
jconsole) and connect to the following JMX URI:
service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root
service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-root
/karaf-ContainerName. If you change the container name from root to some other name, you must modify the JMX URI accordingly.
Enabling the Web console port Copy linkLink copied to clipboard!
- Karaf Web console—is not installed by default. To enable the Karaf Web console, perform the following steps:
- In a running JBoss Fuse instance (see Section 4.1, “Starting Red Hat JBoss Fuse”), enter the following console command:
JBossFuse:karaf@root> features:install webconsole
JBossFuse:karaf@root> features:install webconsoleCopy to Clipboard Copied! Toggle word wrap Toggle overflow - In a Web browser, navigate to the following URL:
http://localhost:8181/system/console
http://localhost:8181/system/consoleCopy to Clipboard Copied! Toggle word wrap Toggle overflow - The browser will prompt you to log on. Enter valid JAAS user credentials to access the console.
- Apache ActiveMQ Web console—is not installed by default. To enable the Apache ActiveMQ Web console, perform the following steps:
- Make sure that you have already configured the container's Java system properties, as described in the section called “Configure the Apache ActiveMQ Web console (optional)”.NoteThe Apache ActiveMQ Web console has a three tier architecture, as shown in Figure 3.1, “Ports Exposed by the Red Hat JBoss Fuse Container”. The credentials provided in this step enable the middle tier (the Web console servlet) to log on to the back-end tier (the Apache ActiveMQ broker).
- In a running JBoss Fuse instance, enter the following console command:
JBossFuse:karaf@root> features:install mq-web-console
JBossFuse:karaf@root> features:install mq-web-consoleCopy to Clipboard Copied! Toggle word wrap Toggle overflow - In a Web browser, navigate to the following URL:
http://localhost:8181/activemqweb
http://localhost:8181/activemqwebCopy to Clipboard Copied! Toggle word wrap Toggle overflow - The browser will prompt you to log on. Enter valid JAAS user credentials to access the console.
Strengthening security on the Web console port Copy linkLink copied to clipboard!
3.2. Disabling Broker Security Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
Standalone server Copy linkLink copied to clipboard!
InstallDir/etc/activemq.xml file using a text editor and look for the following lines:
... <plugins> <jaasAuthenticationPlugin configuration="karaf" /> </plugins> ...
...
<plugins>
<jaasAuthenticationPlugin configuration="karaf" />
</plugins>
...
jaasAuthenticationPlugin element. The next time you start up the Red Hat JBoss Fuse container (using the InstallDir/bin/fusemq script), the broker will run with unsecured ports.
Chapter 4. Starting and Stopping Red Hat JBoss Fuse Copy linkLink copied to clipboard!
Abstract
4.1. Starting Red Hat JBoss Fuse Copy linkLink copied to clipboard!
Abstract
Overview Copy linkLink copied to clipboard!
Setting up your environment Copy linkLink copied to clipboard!
bin directory of your JBoss Fuse installation to the PATH environment variable, as follows:
set PATH=%PATH%;InstallDir\bin
export PATH=$PATH,InstallDir/bin
Launching the runtime Copy linkLink copied to clipboard!
_ ____ ______ | | _ \ | ____| | | |_) | ___ ___ ___ | |__ _ _ ___ ___ _ | | _ / _ \/ __/ __| | __| | | / __|/ _ \ | |__| | |_) | (_) \__ \__ \ | | | |_| \__ \ __/ \____/|____/ \___/|___/___/ |_| \__,_|___/\___| JBoss Fuse (6.0.0.redhat-xxx) http://www.redhat.com/products/jbossenterprisemiddleware/fuse/ Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown JBoss Fuse. JBossFuse:karaf@root>
_ ____ ______ | | _ \ | ____| | | |_) | ___ ___ ___ | |__ _ _ ___ ___ _ | | _ / _ \/ __/ __| | __| | | / __|/ _ \ | |__| | |_) | (_) \__ \__ \ | | | |_| \__ \ __/ \____/|____/ \___/|___/___/ |_| \__,_|___/\___| JBoss Fuse (6.0.0.redhat-xxx) http://www.redhat.com/products/jbossenterprisemiddleware/fuse/ Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown JBoss Fuse. JBossFuse:karaf@root>
Launching the runtime in server mode Copy linkLink copied to clipboard!
bin/fuse server
bin/fuse server
start script in the InstallDir/bin directory.
Launching the runtime in client mode Copy linkLink copied to clipboard!
4.2. Stopping Red Hat JBoss Fuse Copy linkLink copied to clipboard!
stop script.
Stopping an instance from a local console Copy linkLink copied to clipboard!
fuse or fuse client, you can stop it by doing one of the following at the karaf> prompt:
- Type
shutdown -f - Press Ctrl+D
Stopping an instance running in server mode Copy linkLink copied to clipboard!
fuse server or by running the start script, you can stop it remotely, as described in Section 9.3, “Stopping a Remote Container”.
InstallDir/bin directory:
./admin stopinstanceName./stop
etc/org.apache.karaf.shell.cfg is set to the default value of 0.0.0.0, you can run the stop script without any arguments. However, if you have configured a different hostname, you must run stop -h hostname.
Chapter 5. Installing and Securing the Management Console Copy linkLink copied to clipboard!
Abstract
5.1. Installing into a Standalone Container Copy linkLink copied to clipboard!
Procedure Copy linkLink copied to clipboard!
- Open the container's command console.
- Check if the prerequisites are installed using the features:list command.
- If any of the prerequisites are not installed, install them using the features:install command.
- Install the management console using the features:install command shown in Example 5.1, “Installing the Management Console”.
Example 5.1. Installing the Management Console
>features:install fabric-webui
>features:install fabric-webuiCopy to Clipboard Copied! Toggle word wrap Toggle overflow - In your Web browser, open the management console.The management console will be hosted at the container's HTTP service port as specified by the
org.ops4j.pax.webPID'sorg.osgi.service.http.portproperty. The default HTTP port for an Apache Karaf container is8181. - Connect the console to a Fabric.
- Join an existing fabric.
- Click .A form opens where you enter a fabric server's connection information.
- In the Hostname field, enter the name of the machine hosting fabric server for the fabric the console will manage.
- In the Port field, enter the port number used to connect to the fabric server for the fabric the console will manage.
- In the ZooKeeper Password field, enter the password used to access the registry data for the fabric the console will manage.
- Click .The management connects to the fabric and the login page appears.
- Create a new fabric.
- Click .A form opens where you enter the information needed to create a new fabric.
- In the Username field, enter the name of the user for accessing the console and be used to connect to all of the container's in the fabric.
- In the Password field, enter the password for the administrative user.
- In the ZooKeeper Password field, enter the password that will be used to secure access to the fabric's registry data.
- In the Global Resolver field, select the default policy governing how containers in the fabric report their address to other containers.
- In the Local Resolver field, select the policy governing how the container being created reports its address to other containers.
- Enter a range of ports over which the fabric can be contacted.
- Click .The console's server creates the fabric and the login page appears.
5.2. Installing into a Fabric Container Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
fmc profile configures a container to become a management console server. You only need to apply the profile to one container in a fabric to enable the management console.
Procedure Copy linkLink copied to clipboard!
- Open a command console for one of the containers in the fabric.
- Install the management console's profile using the fabric:container-add-profile command shown in Example 5.2, “Installing the Management Console Profile”.
Example 5.2. Installing the Management Console Profile
>fabric:container-add-profile containerName fmc
>fabric:container-add-profile containerName fmcCopy to Clipboard Copied! Toggle word wrap Toggle overflow containerName is the name of the container into which the management console will be installed - In your Web browser, open the management console.The console will be hosted at the container's HTTP service port. To determine the container's HTTP service port:
- Connect to the container into which you deployed the
fmcprofile using the fabric:container-connect command. - Use the config:list command to see the container's configuration.
- Locate the
org.ops4j.pax.webPID. - See the value assigned to the
org.osgi.service.http.portproperty.
If theorg.osgi.service.http.portis not set for this container, you can set it by adding the property to thefmcprofile as shown in Example 5.3, “Setting a Fabric Container's HTTP Port”.Example 5.3. Setting a Fabric Container's HTTP Port
> fabric:profile-edit -p org.ops4j.pax.web/org.osgi.service.http.port=portNumber fmc
> fabric:profile-edit -p org.ops4j.pax.web/org.osgi.service.http.port=portNumber fmcCopy to Clipboard Copied! Toggle word wrap Toggle overflow
5.3. Encrypting the Connection to the Management Console Server Copy linkLink copied to clipboard!
| Revision History | |
|---|---|
| 11/28/12 | |
| Updated to use fabric configuration | |
Abstract
Overview Copy linkLink copied to clipboard!
Creating certificates Copy linkLink copied to clipboard!
Installing the certificates Copy linkLink copied to clipboard!
etc/certs folder. You can, however, store the certificates in any folder from which the container can access them.
Enabling HTTPS Copy linkLink copied to clipboard!
org.ops4j.pax.web PID. To enable HTTPS, you will need to change the properties in that PID for the container in which the management console is running. You can do this is to update the fmc profile deployed to the container. Alternatively, you could create a separate profile to configure the HTTP port.
fmc profile:
- Open a command console connected to one of the container in the fabric.
- Disable the insecure HTTP port setting the org.osgi.service.http.enabled property to
falseas shown in Example 5.4, “Disabling the HTTP Port”.Example 5.4. Disabling the HTTP Port
fabric:profile-edit -p org.ops4j.pax.web/org.osgi.service.http.enabled=false fmc
fabric:profile-edit -p org.ops4j.pax.web/org.osgi.service.http.enabled=false fmcCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Enable the secure HTTPS port by setting the org.osgi.service.http.secure.enabled property to true as shown in Example 5.5, “Property for Enabling the HTTPS Port”.
Example 5.5. Property for Enabling the HTTPS Port
fabric:profile-edit -p org.ops4j.pax.web/org.osgi.service.http.secure.enabled=true fmc
fabric:profile-edit -p org.ops4j.pax.web/org.osgi.service.http.secure.enabled=true fmcCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Specify the port used for connecting over HTTPS by setting the org.osgi.service.http.port.secure property to an available port as shown in Example 5.6, “Property for Specifying the HTTPS Port”.
Example 5.6. Property for Specifying the HTTPS Port
fabric:profile-edit -p org.ops4j.pax.web/org.osgi.service.http.port.secure=8108 fmc
fabric:profile-edit -p org.ops4j.pax.web/org.osgi.service.http.port.secure=8108 fmcCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteYou can reuse port 8107. - Configure the keystore used to hold the X.509 certificates.
- Specify the location of the keystore by adding the org.ops4j.pax.web.ssl.keystore property.
- Specify the type of keystore used by adding the org.ops4j.pax.web.ssl.keystore.type property and setting it to
JKS. - Specify the password for unlocking the Java keystore by adding the org.ops4j.pax.web.ssl.password property.
- Specify the password for decrypting the private key by adding the org.ops4j.pax.web.ssl.keypassword property.NoteThis is typically the same as the password used to unlock the keystore.
- Specify if certificate-based client authentication at the server is wanted by adding the org.ops4j.pax.web.ssl.clientauthwanted property.When set to
truethe server will request that the client send an X.509 certificate during the SSL handshake. - Specify if certificate-based client authentication at the server is required by adding the org.ops4j.pax.web.ssl.clientauthneeded property.When set to
truean exception is thrown if the client does not present a valid X.509 certificate during the SSL handshake.
Chapter 6. Creating a New Fabric Copy linkLink copied to clipboard!
Abstract
Overview Copy linkLink copied to clipboard!
- Fabric Server
- A Fabric Server has a special status in the fabric, because it is responsible for maintaining a replica of the fabric registry. In each Fabric Server, a registry service is installed. The registry service (based on Apache ZooKeeper) maintains a replica of the registry database and provides a ZooKeeper server, which ordinary agents can connect to in order to retrieve registry data.
- Fabric Container
- A Fabric Container is aware of the locations of all of the Fabric Servers, and it can retrieve registry data from any Fabric Server in the Fabric Ensemble. A Fabric Agent is installed in each Fabric Container. The Fabric Agent actively monitors the fabric registry, and whenever a relevant modification is made to the registry, it immediately updates its container to keep the container consistent with the registry settings.
Fabric Ensemble Copy linkLink copied to clipboard!
Procedure Copy linkLink copied to clipboard!
- Connect to the standalone container's command console.
- Any existing users in the
InstallDir/etc/users.propertiesfile are automatically used to initialize the fabric's user data, when you create the fabric. This provides a convenient way to initialize the fabric's user data.If you have not already done so, it is recommended that you populate theusers.propertiesfile, by adding one or more lines of the following form:Username=Password[,RoleA][,RoleB]...
Username=Password[,RoleA][,RoleB]...Copy to Clipboard Copied! Toggle word wrap Toggle overflow At least one of the users must have theadminrole, to enable administration of the fabric. For example:admin=secretpassword,admin
admin=secretpassword,adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Assuming that some users are already defined in the
users.propertiesfile, you can create a new fabric by entering the following command:JBossFuse:karaf@root> fabric:create --zookeeper-password admin
JBossFuse:karaf@root> fabric:create --zookeeper-password adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow The current container (namedrootby default) becomes a Fabric Server with a registry service installed. Initially, this is the only container in the fabric. The Zookeeper password is used to protect sensitive data in the Fabric registry service (all of the nodes under/fabric).NoteIf you want to import a predefined set of profiles, use the-p import-diroption to specify the set of profiles to import.For more details on fabric:create see section "Description" in "Console Reference". - (Alternative) If no users are predefined in the
users.propertiesfile, an alternative approach is to define a new user at the same time the fabric is created, by supplying the--new-userand--new-user-passwordoptions, as follows:JBossFuse:karaf@root> fabric:create --new-user jdoe --new-user-password secretpassword --zookeeper-password admin
JBossFuse:karaf@root> fabric:create --new-user jdoe --new-user-password secretpassword --zookeeper-password adminCopy to Clipboard Copied! Toggle word wrap Toggle overflow The new user,jdoe, is automatically assigned theadminrole, which gives the user full administration privileges.
Fabric creation process Copy linkLink copied to clipboard!
- The container installs the requisite OSGi bundles to become a Fabric Server.
- The Fabric Server starts a registry service, which listens on IP port 2181 (which makes fabric configuration data available to all of the containers in the fabric).
- The Fabric Server installs a new JAAS realm (based on the ZooKeeper login module), which overrides the default JAAS realm and stores its user data in the ZooKeeper registry.
- The new Fabric Ensemble consists of a single Fabric Server (the current container).
- A default set of profiles is imported from
InstallDir/fabric/import(can optionally be overridden). - After the standalone container is converted into a Fabric Server, the previously installed OSGi bundles and Karaf features are completely cleared away and replaced by the default Fabric Server configuration. For example, some of the shell command sets that were available in the standalone container are no longer available in the Fabric Server.
Chapter 7. Joining a Fabric Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
- A managed container is a full member of the fabric and is managed by a Fabric Agent. The agent configures the container based on information provided by the fabric's ensemble. The ensemble knows which profiles are associated with the container and the agent determines what to install based on the contents of the profiles.
- A non-managed container is not managed by a Fabric Agent. Its configuration remains intact after it joins the fabric and is controlled as if the container were a standalone container. Joining the fabric in this manner registers the container with the fabric's ensemble and allows clients to locate the services running in the container using the fabric's discovery mechanism.
Joining a fabric as a managed container Copy linkLink copied to clipboard!
fabric profile. If you want to preserve the previous configuration of the container, however, you must ensure that the fabric has an appropriately configured profile, which you can deploy into the container after it joins the fabric.
-p option enables you to specify a profile to install into the container once the agent is installed.
Joining a fabric as an non-managed container Copy linkLink copied to clipboard!
osgi:install, features:install, and hot deployment), because a Fabric Agent does not take control of its configuration. The agent only registers the container with the fabric's ensemble and keeps the registry entries for it up to date. This enables the newly joined container to discover services running in the container (through Fabric's discovery mechanisms) and to administer these services.
How to join a fabric Copy linkLink copied to clipboard!
- Get the registry service URL for one of the Fabric Servers in the existing fabric. The registry service URL has the following format:
Hostname[:IPPort]
Hostname[:IPPort]Copy to Clipboard Copied! Toggle word wrap Toggle overflow Normally, it is sufficient to specify just the hostname, Hostname, because the registry service uses the fixed port number, 2182, by default. In exceptional cases, you can discover the registry service port by following the instructions in the section called “How to discover the URL of a Fabric Server”. - Get the ZooKeeper password for the fabric. An administrator can access the fabric's ZooKeeper password at any time, by entering the following console command (while logged into one of the Fabric Containers):
JBossFuse:karaf@root> fabric:ensemble-password
JBossFuse:karaf@root> fabric:ensemble-passwordCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Connect to the standalone container's command console.
- Join a container in one of the following ways:
- Join as a managed container, with a default profile—uses the
fabricprofile.JBossFuse:karaf@root> fabric:join --zookeeper-password ZooPass URL ContainerName
JBossFuse:karaf@root> fabric:join --zookeeper-password ZooPass URL ContainerNameCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Join as a managed container, specifying a custom profile—uses a custom profile.
JBossFuse:karaf@root> fabric:join --zookeeper-password ZooPass -p Profile URL ContainerName
JBossFuse:karaf@root> fabric:join --zookeeper-password ZooPass -p Profile URL ContainerNameCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Join as a non-managed container—preserves the existing container configuration.
JBossFuse:karaf@root> fabric:join -n --zookeeper-password ZooPass URL ContainerName
JBossFuse:karaf@root> fabric:join -n --zookeeper-password ZooPass URL ContainerNameCopy to Clipboard Copied! Toggle word wrap Toggle overflow
Where you can specify the following values:-
ZooPass - The existing fabric's ZooKeeper password.
-
URL - The URL for one of the fabric's registry services (usually just the hostname where a Fabric Server is running).
-
ContainerName - The new name of the container when it registers itself with the fabric.WarningIf the container your're adding to the fabric has the same name as a container already registered with the fabric, both containers will be reset and will always share the same configuration.
-
Profile - The name of the custom profile to install into the container after it joins the fabric (managed container only).
- If you joined the container as a managed container, you can subsequently deploy a different profile into the container using the
fabric:container-change-profileconsole command.
How to discover the URL of a Fabric Server Copy linkLink copied to clipboard!
- Connect to the command console of one of the containers in the fabric.
- Enter the following sequence of console commands:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Thezookeeper.urlproperty holds a comma-separated list of Fabric Server URLs. You can use any one of these URLs to join the fabric.
Chapter 8. Shutting Down a Fabric Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
Shutting down a managed container Copy linkLink copied to clipboard!
fabric:container-stop command, specifying the name of the managed container—for example:
fabric:container-stop ManagedContainerName
fabric:container-stop ManagedContainerName
fabric:container-stop command looks up the container name in the registry and retrieves the data it needs to shut down that container. This approach works no matter where the container is deployed: whether on a remote host or in a cloud.
Shutting down a Fabric Server Copy linkLink copied to clipboard!
registry1, registry2, and registry3, you can shut down at most one of these Fabric Servers at a time using the fabric:container-stop command—for example:
fabric:container-stop registry3
fabric:container-stop registry3
fabric:container-start registry3
fabric:container-start registry3
Shutting down an entire fabric Copy linkLink copied to clipboard!
- To take a concrete example, consider a fabric which consists of the following containers:
- Three Fabric Servers (ensemble servers):
registry1,registry2,registry3. - Four managed containers:
managed1,managed2,managed3,managed4.
- Use the
clientconsole utility to log on to one of the containers in the fabric. Because this will be the last container to shut down, it is convenient to choose one of the Fabric Servers. For example, to log on to theregistry1server, enter the following command:./client -u AdminUser -p AdminPass -h Registry1Host
./client -u AdminUser -p AdminPass -h Registry1HostCopy to Clipboard Copied! Toggle word wrap Toggle overflow WhereRegistry1Hostis the host whereregistry1is running andAdminUserandAdminPassare the credentials of a user with administration privileges. It is assumed that theregistry1server is listening for console connections on the default IP port (that is,8101) - Shut down all of the managed containers in the fabric, using the
fabric:container-stopcommand—for example:fabric:container-stop managed1 fabric:container-stop managed2 fabric:container-stop managed3 fabric:container-stop managed4
fabric:container-stop managed1 fabric:container-stop managed2 fabric:container-stop managed3 fabric:container-stop managed4Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Remove all but one of the Fabric Servers from the ensemble, using the
fabric:ensemble-removecommand. For example, given the ensemble consisting ofregistry1,registry2, andregistry3(where you are logged on toregistry1), removeregistry2andregistry3from the ensemble as follows:fabric:ensemble-remove registry2 registry3
fabric:ensemble-remove registry2 registry3Copy to Clipboard Copied! Toggle word wrap Toggle overflow - You can now shut down the
registry2andregistry3containers using thefabric:container-stopcommand, as follows:fabric:container-stop registry2 fabric:container-stop registry3
fabric:container-stop registry2 fabric:container-stop registry3Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Assuming you are logged on to
registry1(the sole remaining Fabric Server), shut it down as follows:shutdown -f
shutdown -fCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Whenever you restart the fabric, you will have to remember to recreate the ensemble, so that it consists of three Fabric Servers again. For example, to recreate the ensemble consisting of
registry1,registry2, andregistry3, you would restart the three servers, and then enter the following command:fabric:ensemble-add registry2 registry3
fabric:ensemble-add registry2 registry3Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Note on shutting down the ensemble Copy linkLink copied to clipboard!
fabric:container-stop registry1 fabric:container-stop registry2 fabric:container-stop registry3
fabric:container-stop registry1
fabric:container-stop registry2
fabric:container-stop registry3
fabric:container-stop will fail and throw an error. This is because of the quorum-based voting system used by the ensemble (which is designed to protect against network splits). After the first two Fabric servers (registry1 and registry2) are shut down, fewer than half of the ensemble servers are available. At this point, the registry shuts down and refuses to service any more requests, because there is no longer a quorum of ensemble servers available (that is, fewer than 50% of the ensemble servers are available). This causes a problem for the fabric:container-stop command, which normally contacts the registry to retrieve details about the container it is trying to shut down.
fabric:ensemble-remove, before attempting to shut down the ensemble servers.
Chapter 9. Using Remote Connections to Manage a Container Copy linkLink copied to clipboard!
| Revision History | |
|---|---|
| 09/10/12 | |
| Moved Child Container to separate chapter | |
| 09/10/12 | |
| Removed Karaf language | |
Abstract
9.1. Configuring a Container for Remote Access Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
Configuring a container for remote access Copy linkLink copied to clipboard!
InstallDir/etc/org.apache.karaf.shell.cfg configuration file. Example 9.1, “Changing the Port for Remote Access” shows a sample configuration that changes the port used to 8102.
Example 9.1. Changing the Port for Remote Access
sshPort=8102 sshHost=0.0.0.0
sshPort=8102
sshHost=0.0.0.0
9.2. Connecting and Disconnecting Remotely Copy linkLink copied to clipboard!
Abstract
9.2.1. Connecting to a Container from a Remote Container Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
Using the ssh:ssh console command Copy linkLink copied to clipboard!
Example 9.2. ssh:ssh Command Syntax
ssh:ssh {
-l username
} {
-P password
} {
-p port
} {
hostname
}
-
-l username - The username used to connect to the remote container. Use valid JAAS login credentials that have
adminprivileges (see Chapter 15, Configuring JAAS Security). -
-P password - The password used to connect to the remote container.
-
-p port - The SSH port used to access the desired container's remote console.By default this value is
8101. See the section called “Configuring a container for remote access” for details on changing the port number. -
hostname - The hostname of the machine that the remote container is running on. See the section called “Configuring a container for remote access” for details on changing the hostname.
etc/users.properties file. See Chapter 15, Configuring JAAS Securityfor details.
Example 9.3. Connecting to a Remote Console
JBossFuse:karaf@root>ssh:ssh -l smx -P smx -p 8108 hostname
JBossFuse:karaf@root>ssh:ssh -l smx -P smx -p 8108 hostname
shell:info at the prompt. Information about the currently connected instance is returned, as shown in Example 9.4, “Output of the shell:info Command”.
Example 9.4. Output of the shell:info Command
Karaf Karaf version 2.2.5.fuse-beta-7-052 Karaf home /Volumes/ESB/jboss-fuse-full-6.0.0.redhat-0XX Karaf base /Volumes/ESB/jboss-fuse-full-6.0.0.redhat-0XX/instances/child1 OSGi Framework org.apache.felix.framework - 4.0.3.fuse-beta-7-052 JVM Java Virtual Machine Java HotSpot(TM) 64-Bit Server VM version 20.6-b01-415 Version 1.6.0_31 Vendor Apple Inc. Uptime 6 minutes Total compile time 24.048 seconds Threads Live threads 62 Daemon threads 43 Peak 287 Total started 313 Memory Current heap size 78,981 kbytes Maximum heap size 466,048 kbytes Committed heap size 241,920 kbytes Pending objects 0 Garbage collector Name = 'PS Scavenge', Collections = 11, Time = 0.271 seconds Garbage collector Name = 'PS MarkSweep', Collections = 1, Time = 0.117 seconds Classes Current classes loaded 5,720 Total classes loaded 5,720 Total classes unloaded 0 Operating system Name Mac OS X version 10.7.3 Architecture x86_64 Processors 2
Karaf Karaf version 2.2.5.fuse-beta-7-052 Karaf home /Volumes/ESB/jboss-fuse-full-6.0.0.redhat-0XX Karaf base /Volumes/ESB/jboss-fuse-full-6.0.0.redhat-0XX/instances/child1 OSGi Framework org.apache.felix.framework - 4.0.3.fuse-beta-7-052 JVM Java Virtual Machine Java HotSpot(TM) 64-Bit Server VM version 20.6-b01-415 Version 1.6.0_31 Vendor Apple Inc. Uptime 6 minutes Total compile time 24.048 seconds Threads Live threads 62 Daemon threads 43 Peak 287 Total started 313 Memory Current heap size 78,981 kbytes Maximum heap size 466,048 kbytes Committed heap size 241,920 kbytes Pending objects 0 Garbage collector Name = 'PS Scavenge', Collections = 11, Time = 0.271 seconds Garbage collector Name = 'PS MarkSweep', Collections = 1, Time = 0.117 seconds Classes Current classes loaded 5,720 Total classes loaded 5,720 Total classes unloaded 0 Operating system Name Mac OS X version 10.7.3 Architecture x86_64 Processors 2
Disconnecting from a remote console Copy linkLink copied to clipboard!
logout or press Ctrl+D at the prompt.
9.2.2. Connecting to a Container Using the Client Command-Line Utility Copy linkLink copied to clipboard!
Using the remote client Copy linkLink copied to clipboard!
InstallDir/bin directory), as follows:
client
client
client -a 8101 -h hostname -u username -p password shell:info
client -a 8101 -h hostname -u username -p password shell:info
-p option, you will be prompted to enter a password.
admin privileges.
admin and admin.
client --help
client --help
Example 9.5. Karaf Client Help
Apache Felix Karaf client -a [port] specify the port to connect to -h [host] specify the host to connect to -u [user] specify the user name -p [password] specify the password --help shows this help message -v raise verbosity -r [attempts] retry connection establishment (up to attempts times) -d [delay] intra-retry delay (defaults to 2 seconds) [commands] commands to run If no commands are specified, the client will be put in an interactive mode
Apache Felix Karaf client -a [port] specify the port to connect to -h [host] specify the host to connect to -u [user] specify the user name -p [password] specify the password --help shows this help message -v raise verbosity -r [attempts] retry connection establishment (up to attempts times) -d [delay] intra-retry delay (defaults to 2 seconds) [commands] commands to run If no commands are specified, the client will be put in an interactive mode
Disconnecting from a remote client console Copy linkLink copied to clipboard!
9.2.3. Connecting to a Container Using the SSH Command-Line Utility Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
ssh command-line utility (a standard utility on UNIX-like operating systems) to log in to the Red Hat JBoss Fuse container, where the authentication mechanism is based on public key encryption (the public key must first be installed in the container). For example, given that the container is configured to listen on IP port 8101, you could log in as follows:
ssh -p 8101 jdoe@localhost
ssh -p 8101 jdoe@localhost
Prerequisites Copy linkLink copied to clipboard!
- The container must be standalone (Fabric is not supported) with the
PublickeyLoginModuleinstalled. - You must have created an SSH key pair (see the section called “Creating a new SSH key pair”).
- You must install the public key from the SSH key pair into the container (see the section called “Installing the SSH public key in the container”).
Default key location Copy linkLink copied to clipboard!
ssh command automatically looks for the private key in the default key location. It is recommended that you install your key in the default location, because it saves you the trouble of specifying the location explicitly.
~/.ssh/id_rsa ~/.ssh/id_rsa.pub
~/.ssh/id_rsa
~/.ssh/id_rsa.pub
C:\Documents and Settings\Username\.ssh\id_rsa C:\Documents and Settings\Username\.ssh\id_rsa.pub
C:\Documents and Settings\Username\.ssh\id_rsa
C:\Documents and Settings\Username\.ssh\id_rsa.pub
Creating a new SSH key pair Copy linkLink copied to clipboard!
ssh-keygen utility. Open a new command prompt and enter the following command:
ssh-keygen -t rsa -b 2048
ssh-keygen -t rsa -b 2048
Generating public/private rsa key pair. Enter file in which to save the key (/Users/Username/.ssh/id_rsa):
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/Username/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter passphrase (empty for no passphrase):
Installing the SSH public key in the container Copy linkLink copied to clipboard!
InstallDir/etc/keys.properties file. Each user entry in this file appears on a single line, in the following format:
Username=PublicKey,Role1,Role2,...
Username=PublicKey,Role1,Role2,...
~/.ssh/id_rsa.pub, has the following contents:
jdoe user with the admin role by adding the following entry to the InstallDir/etc/keys.properties file (on a single line):
id_rsa.pub file here. Insert just the block of symbols which represents the public key itself.
Checking that public key authentication is supported Copy linkLink copied to clipboard!
jaas:realms console command, as follows:
Index Realm Module Class
1 karaf org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
2 karaf org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
Index Realm Module Class
1 karaf org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
2 karaf org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
PublickeyLoginModule is installed. With this configuration you can log in to the container using either username/password credentials or public key credentials.
Logging in using key-based SSH Copy linkLink copied to clipboard!
ssh -p 8101 jdoe@localhost _ ____ ______ | | _ \ | ____| | | |_) | ___ ___ ___ | |__ _ _ ___ ___ _ | | _ < / _ \/ __/ __| | __| | | / __|/ _ \ | |__| | |_) | (_) \__ \__ \ | | | |_| \__ \ __/ \____/|____/ \___/|___/___/ |_| \__,_|___/\___| JBoss Fuse (6.0.0.redhat-xxx) http://www.redhat.com/products/jbossenterprisemiddleware/fuse/ Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown JBoss Fuse. JBossFuse:fbolton@root>
$ ssh -p 8101 jdoe@localhost _ ____ ______ | | _ \ | ____| | | |_) | ___ ___ ___ | |__ _ _ ___ ___ _ | | _ < / _ \/ __/ __| | __| | | / __|/ _ \ | |__| | |_) | (_) \__ \__ \ | | | |_| \__ \ __/ \____/|____/ \___/|___/___/ |_| \__,_|___/\___| JBoss Fuse (6.0.0.redhat-xxx) http://www.redhat.com/products/jbossenterprisemiddleware/fuse/ Hit '<tab>' for a list of available commands and '[cmd] --help' for help on a specific command. Hit '<ctrl-d>' or 'osgi:shutdown' to shutdown JBoss Fuse. JBossFuse:fbolton@root>
ssh utility will prompt you to enter the pass phrase.
9.3. Stopping a Remote Container Copy linkLink copied to clipboard!
Using the stop script Copy linkLink copied to clipboard!
InstallDir/bin directory.
Example 9.6. stop Script Syntax
stop [
-a port
] {
-h hostname
} {
-u username
} {
-p password
}
-
-a port - The SSH port of the remote instance. Defaults to 8101.
-
-h hostname - The hostname of the machine that the remote instance is running on.
-
-u username - The username used to connect to the remote instance. Use valid JAAS login credentials that have
adminprivileges -
-p password - The password used to connect to the remote instance.
Using the remote console Copy linkLink copied to clipboard!
Chapter 10. Managing Child Containers Copy linkLink copied to clipboard!
Abstract
10.1. Standalone Child Containers Copy linkLink copied to clipboard!
Using the admin console commands Copy linkLink copied to clipboard!
Creating child containers Copy linkLink copied to clipboard!
admin:create in the JBoss Fuse console.
instances/containerName directory. The child container is assigned an SSH port number based on an incremental count starting at 8101. Creating a container this way does not inherit configuration information from the parent; any feature repositories and features needed from the parent will have to be manually added to the child.
Example 10.1. Creating a Runtime Instance
FuseESB@root>admin:create finn Creating new instance on port 8106 at: /home/fuse/esb4/instances/finn Creating dir: /home/fuse/esb4/instances/finn/bin Creating dir: /home/fuse/esb4/instances/finn/etc Creating dir: /home/fuse/esb4/instances/finn/system Creating dir: /home/fuse/esb4/instances/finn/deploy Creating dir: /home/fuse/esb4/instances/finn/data Creating file: /home/fuse/esb4/instances/finn/etc/config.properties Creating file: /home/fuse/esb4/instances/finn/etc/java.util.logging.properties Creating file: /home/fuse/esb4/instances/finn/etc/org.apache.felix.fileinstall-deploy.cfg Creating file: /home/fuse/esb4/instances/finn/etc/org.apache.karaf.log.cfg Creating file: /home/fuse/esb4/instances/finn/etc/org.apache.karaf.features.cfg Creating file: /home/fuse/esb4/instances/finn/etc/org.apache.karaf.management.cfg Creating file: /home/fuse/esb4/instances/finn/etc/org.ops4j.pax.logging.cfg Creating file: /home/fuse/esb4/instances/finn/etc/org.ops4j.pax.url.mvn.cfg Creating file: /home/fuse/esb4/instances/finn/etc/startup.properties Creating file: /home/fuse/esb4/instances/finn/etc/system.properties Creating file: /home/fuse/esb4/instances/finn/etc/org.apache.karaf.shell.cfg Creating file: /home/fuse/esb4/instances/finn/bin/karaf Creating file: /home/fuse/esb4/instances/finn/bin/start Creating file: /home/fuse/esb4/instances/finn/bin/stop
FuseESB@root>admin:create finn
Creating new instance on port 8106 at: /home/fuse/esb4/instances/finn Creating dir: /home/fuse/esb4/instances/finn/bin Creating dir: /home/fuse/esb4/instances/finn/etc Creating dir: /home/fuse/esb4/instances/finn/system Creating dir: /home/fuse/esb4/instances/finn/deploy Creating dir: /home/fuse/esb4/instances/finn/data Creating file: /home/fuse/esb4/instances/finn/etc/config.properties Creating file: /home/fuse/esb4/instances/finn/etc/java.util.logging.properties Creating file: /home/fuse/esb4/instances/finn/etc/org.apache.felix.fileinstall-deploy.cfg Creating file: /home/fuse/esb4/instances/finn/etc/org.apache.karaf.log.cfg Creating file: /home/fuse/esb4/instances/finn/etc/org.apache.karaf.features.cfg Creating file: /home/fuse/esb4/instances/finn/etc/org.apache.karaf.management.cfg Creating file: /home/fuse/esb4/instances/finn/etc/org.ops4j.pax.logging.cfg Creating file: /home/fuse/esb4/instances/finn/etc/org.ops4j.pax.url.mvn.cfg Creating file: /home/fuse/esb4/instances/finn/etc/startup.properties Creating file: /home/fuse/esb4/instances/finn/etc/system.properties Creating file: /home/fuse/esb4/instances/finn/etc/org.apache.karaf.shell.cfg Creating file: /home/fuse/esb4/instances/finn/bin/karaf Creating file: /home/fuse/esb4/instances/finn/bin/start Creating file: /home/fuse/esb4/instances/finn/bin/stop
Cloning a container Copy linkLink copied to clipboard!
Changing a child's SSH port Copy linkLink copied to clipboard!
admin:change-port {
containerName
} {
portNumber
}
Starting child containers Copy linkLink copied to clipboard!
Listing all child containers Copy linkLink copied to clipboard!
Example 10.2. Listing Instances
JBossFuse:karaf@root>admin:list Port State Pid Name [ 8107] [Started ] [10628] harry [ 8101] [Started ] [20076] root [ 8106] [Started ] [15924] dick [ 8105] [Started ] [18224] tom
JBossFuse:karaf@root>admin:list
Port State Pid Name [ 8107] [Started ] [10628] harry [ 8101] [Started ] [20076] root [ 8106] [Started ] [15924] dick [ 8105] [Started ] [18224] tom
Connecting to a child container Copy linkLink copied to clipboard!
Example 10.3. Admin connect Command
admin:connect {
containerName
} {
-u username
} {
-p password
}
- containerName
- The name of the child to which you want to connect.
-
-uusername - The username used to connect to the child's remote console. Use valid JAAS user credentials that have admin privileges (see Chapter 15, Configuring JAAS Security).
-
-ppassword - This argument specifies the password used to connect to the child's remote console.
JBossFuse:karaf@harry>
JBossFuse:karaf@harry>
Stopping a child container Copy linkLink copied to clipboard!
osgi:shutdown or simply shutdown.
admin:stop containerName.
Destroying a child container Copy linkLink copied to clipboard!
Changing the JVM options on a child container Copy linkLink copied to clipboard!
admin:change-opts command. For example, you could change the amamount of memory allocated to the child container's JVM, as follows:
JBossFuse:karaf@harry> admin:change-opts tom "-server -Xms128M -Xmx1345m -Dcom.sun.management.jmxremote"
JBossFuse:karaf@harry> admin:change-opts tom "-server -Xms128M -Xmx1345m -Dcom.sun.management.jmxremote"
Using the admin script Copy linkLink copied to clipboard!
InstallDir/bin directory provides the all of the admin console commands except for admin:connect.
Example 10.4. The admin Script
admin.bat: Ignoring predefined value for KARAF_HOME Available commands: change-port - Changes the port of an existing container instance. create - Creates a new container instance. destroy - Destroys an existing container instance. list - List all existing container instances. start - Starts an existing container instance. stop - Stops an existing container instance. Type 'command --help' for more help on the specified command.
admin.bat: Ignoring predefined value for KARAF_HOME Available commands: change-port - Changes the port of an existing container instance. create - Creates a new container instance. destroy - Destroys an existing container instance. list - List all existing container instances. start - Starts an existing container instance. stop - Stops an existing container instance. Type 'command --help' for more help on the specified command.
admin.bat list
admin.bat list
./admin list
./admin list
10.2. Fabric Child Containers Copy linkLink copied to clipboard!
Creating child containers Copy linkLink copied to clipboard!
fabric:container-create-child console command, which has the following syntax:
karaf@root> fabric:container-create-child parent child [number]
karaf@root> fabric:container-create-child parent child [number]
child1, child2, and so on.
karaf@root> fabric:container-create-child root child 2 The following containers have been created successfully: child1 child2
karaf@root> fabric:container-create-child root child 2
The following containers have been created successfully:
child1
child2
Listing all container instances Copy linkLink copied to clipboard!
fabric:container-list console command. For example:
JBossFuse:karaf@root> fabric:container-list [id] [version] [alive] [profiles] [provision status] root 1.0 true fabric, fabric-ensemble-0000-1 child1 1.0 true default success child2 1.0 true default success
JBossFuse:karaf@root> fabric:container-list
[id] [version] [alive] [profiles] [provision status]
root 1.0 true fabric, fabric-ensemble-0000-1
child1 1.0 true default success
child2 1.0 true default success
Assigning a profile to a child container Copy linkLink copied to clipboard!
default profile when it is created. To assign a new profile (or profiles) to a child container after it has been created, use the fabric:container-change-profile console command.
default to a newly created container by using the fabric:container-create-child command's --profile argument.
example-camel profile to the child1 container, enter the following console command:
JBossFuse:karaf@root> fabric:container-change-profile child1 example-camel
JBossFuse:karaf@root> fabric:container-change-profile child1 example-camel
child1 and replaces them with the specified list of profiles (where in this case, there is just one profile in the list, example-camel).
Connecting to a child container Copy linkLink copied to clipboard!
fabric:container-connect console command. For example, to connect to child1, enter the following console command:
JBossFuse:karaf@root>fabric:container-connect -u admin -p admin child1
JBossFuse:karaf@root>fabric:container-connect -u admin -p admin child1
Ctrl-D.
Starting a child container Copy linkLink copied to clipboard!
child1:
JBossFuse:karaf@root>fabric:container-start child1
JBossFuse:karaf@root>fabric:container-start child1
Stopping a child container Copy linkLink copied to clipboard!
child1:
JBossFuse:karaf@root>fabric:container-stop child1
JBossFuse:karaf@root>fabric:container-stop child1
child1 container.
Destroying a child container Copy linkLink copied to clipboard!
child1 container instance, enter the following console command:
JBossFuse:karaf@root> fabric:container-delete child1
JBossFuse:karaf@root> fabric:container-delete child1
- stops the child's JVM process
- physically removes all files related to the child container
Chapter 11. Deploying a New Broker Instance Copy linkLink copied to clipboard!
Abstract
Overview Copy linkLink copied to clipboard!
Standalone containers Copy linkLink copied to clipboard!
- Create a template Apache ActiveMQ XML configuration file in a location that is accessible to the container.
- In the JBoss Fuse command console, use the config:edit command to create a new OSGi configuration file.ImportantThe PID must start with
org.fusesource.mq.fabric.server-. - Use the config:propset command to associate your template XML configuration with the broker OSGi configuration as shown in Example 11.1, “Specifying a Broker's Template XML Configuration”.
Example 11.1. Specifying a Broker's Template XML Configuration
JBossFuse:karaf@root> config:propset config configFile
JBossFuse:karaf@root> config:propset config configFileCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the config:propset command to set the required properties.The properties that need to be set will depend on the properties you specified using property place holders in the template XML configuration and the broker's network settings.For information on using config:propset see section "Details" in "Console Reference".
- Save the new OSGi configuration using the config:update command.
${karaf.base}/etc/activemq.xml. You will also need to provide values for the data property, the broker-name property, and the openwire-port property.
Fabric containers Copy linkLink copied to clipboard!
- Create a template Apache ActiveMQ XML configuration file in a location that is accessible to the container.
- In the JBoss Fuse command console, use the fabric:import command to upload the your XML configuration template to the Fabric Ensemble as shown in Example 11.2, “Uploading a Template to a Fabric Ensemble”.
Example 11.2. Uploading a Template to a Fabric Ensemble
JBossFuse:karaf@root> fabric:import -t /fabric/configs/versions/version/profiles/mq-base/configFile configFile
JBossFuse:karaf@root> fabric:import -t /fabric/configs/versions/version/profiles/mq-base/configFile configFileCopy to Clipboard Copied! Toggle word wrap Toggle overflow version must match the version of the new profile you will create for the new broker. - Use the fabric:mq-create command to create a profile for the new broker and assign it to a container.
- To deploy the new broker into an existing container use the command shown in Example 11.3, “Creating a New Broker in an Existing Container”
Example 11.3. Creating a New Broker in an Existing Container
JBossFuse:karaf@root> fabric:mq-create --assign-container containerName --config configFile profileName
JBossFuse:karaf@root> fabric:mq-create --assign-container containerName --config configFile profileNameCopy to Clipboard Copied! Toggle word wrap Toggle overflow This will create a new broker profile that inherits from themq-baseprofile, but uses your XML configuration template, and deploy it to the specified container. - To deploy the new broker into an new container use the command shown in Example 11.4, “Creating a New Broker in a New Container”
Example 11.4. Creating a New Broker in a New Container
JBossFuse:karaf@root> fabric:mq-create --create-container containerName --config configFile profileName
JBossFuse:karaf@root> fabric:mq-create --create-container containerName --config configFile profileNameCopy to Clipboard Copied! Toggle word wrap Toggle overflow This will create a new broker profile that inherits from themq-baseprofile, but uses your XML configuration template, create a new container named containerName, and deploy the broker profile to it.NoteThe new container will be a child of the container from which you execute the fabric:mq-create command.
NoteYou can add network configuration settings to the profile as well. See section "Arguments" in "Console Reference". - Use the fabric:profile-edit command shown in Example 11.5, “Editing a Broker Profile” to set the required properties.
Example 11.5. Editing a Broker Profile
JBossFuse:karaf@root> fabric:profile-edit --pid org.fusesource.mq.fabric.server-profileName/property=value profileName
JBossFuse:karaf@root> fabric:profile-edit --pid org.fusesource.mq.fabric.server-profileName/property=value profileNameCopy to Clipboard Copied! Toggle word wrap Toggle overflow The properties that need to be set will depend on the properties you specified using property place holders in the template XML configuration and the broker's network settings.For information on using fabric:profile-edit see section "Description" in "Console Reference".
Example Copy linkLink copied to clipboard!
myBroker that stores its data in InstallDir/data/myBroker and opens a port at 61617, you would do the following:
- Open the JBoss Fuse command console.
- In the JBoss Fuse command console, use the config:edit command to create a new OSGi configuration file:
JBossFuse:karaf@root> config:edit org.fusesource.mq.fabric.server-myBroker
JBossFuse:karaf@root> config:edit org.fusesource.mq.fabric.server-myBrokerCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the config:propset command to associate your template XML configuration with the broker OSGi configuration:
JBossFuse:karaf@root> config:propset config ${karaf.base}/etc/activemq.xmlJBossFuse:karaf@root> config:propset config ${karaf.base}/etc/activemq.xmlCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the config:propset command to specify the new broker's data directory:
JBossFuse:karaf@root> config:propset data ${karaf.data}/myBrokerJBossFuse:karaf@root> config:propset data ${karaf.data}/myBrokerCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the config:propset command to specify the new broker's name:
JBossFuse:karaf@root> config:propset broker-name myBroker
JBossFuse:karaf@root> config:propset broker-name myBrokerCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Use the config:propset command to specify the new broker's openwire port:
JBossFuse:karaf@root> config:propset openwire-port 61617
JBossFuse:karaf@root> config:propset openwire-port 61617Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Save the new OSGi configuration using the config:update command.
Chapter 12. Configuring Red Hat JBoss Fuse Copy linkLink copied to clipboard!
| Revision History | |
|---|---|
| 08/20/12 | |
| Making the chapter a more generic description of the configuration mechanism and adding information about manipulating the configuration with Fuse Fabric | |
Abstract
12.1. Introducing Red Hat JBoss Fuse Configuration Copy linkLink copied to clipboard!
OSGi configuration Copy linkLink copied to clipboard!
.cfg file in the InstallDir/etc directory. The file is interpreted using the Java properties file format. The filename is mapped to the persistent identifier (PID) of the service that is to be configured. In OSGi, a PID is used to identify a service across restarts of the container.
Configuration files Copy linkLink copied to clipboard!
| Filename | Description |
|---|---|
activemq.xml | Configures the default Apache ActiveMQ broker in a Fabric (used in combination with the org.fusesource.mq.fabric.server-default.cfg file). |
config.properties | The main configuration file for the container See Section 12.2, “Setting OSGi Framework and Initial Container Properties” for details. |
keys.properties | Lists the users who can access the JBoss Fuse runtime using the SSH key-based protocol. The file's contents take the format username=publicKey,role |
org.apache.aries.transaction.cfg | Configures the transaction feature |
org.apache.felix.fileinstall-deploy.cfg | Configures a watched directory and polling interval for hot deployment. |
org.apache.karaf.features.cfg | Configures a list of feature repositories to be registered and a list of features to be installed when JBoss Fuse starts up for the first time. |
org.apache.karaf.features.obr.cfg | Configures the default values for the features OSGi Bundle Resolver (OBR). |
org.apache.karaf.jaas.cfg | Configures options for the Karaf JAAS login module. Mainly used for configuring encrypted passwords (disabled by default). |
org.apache.karaf.log.cfg | Configures the output of the log console commands. See Section 17.1, “Logging Configuration”. |
org.apache.karaf.management.cfg |
Configures the JMX system. See Chapter 14, Configuring JMX for details.
|
org.apache.karaf.shell.cfg |
Configures the properties of remote consoles. For more information see Section 9.1, “Configuring a Container for Remote Access”.
|
org.apache.servicemix.jbi.cfg |
Configures the shutdown timeout for the JBI container.
|
org.apache.servicemix.nmr.cfg |
Configures the default thread pool settings for JBI. See .
|
org.apache.servicemix.components.Name.cfg |
Configures the thread pool settings specifically for the Name JBI component. See .
|
org.fusesource.bai.agent.cfg | Configures the Fuse BAI (Business Activity Insight) feature, if it is installed. |
org.fusesource.fabric.fab.osgi.url.cfg | Configures the Maven repositories used by the Fuse Application Bundle (FAB) runtime when downloading artifacts. If the properties in this file are not set, FAB defaults to the values in org.ops4j.pax.url.mvn.cfg. |
org.fusesource.fabric.maven.cfg | Configures the Maven repositories used by the Fabric Maven Proxy when downloading artifacts, (The Fabric Maven Proxy is used for provisioning new containers on a remote host.) |
org.fusesource.mq.fabric.server-default.cfg | Configures the default Apache ActiveMQ broker in a Fabric (used in combination with the activemq.xml file). |
org.jclouds.shell.cfg | Configures options for formatting the output of jclouds:* console commands. |
org.ops4j.pax.logging.cfg |
Configures the logging system. For more, see Section 17.1, “Logging Configuration”.
|
org.ops4j.pax.url.mvn.cfg | Configures additional URL resolvers. |
org.ops4j.pax.web.cfg | Configures the default Jetty container (Web server). See Securing the Web Console. |
startup.properties
| Specifies which bundles are started in the container and their start-levels. Entries take the format bundle=start-level. |
system.properties |
Specifies Java system properties. Any properties set in this file are available at runtime using
System.getProperties(). See Setting System and Config Properties for more.
|
users.properties | Lists the users who can access the JBoss Fuse runtime either remotely or via the web console. The file's contents take the format username=password,role |
Configuration file naming convention Copy linkLink copied to clipboard!
<PID>.cfg
<PID>.cfg
<PID> is the persistent ID of the OSGi Managed Service (as defined in the OSGi Configuration Admin specification). A persistent ID is normally dot-delimited—for example, org.ops4j.pax.web.
<PID>-<InstanceID>.cfg
<PID>-<InstanceID>.cfg
<PID> is the persistent ID of the OSGi Managed Service Factory. In the case of a managed service factory's <PID>, you can append a hyphen followed by an arbitrary instance ID, <InstanceID>. The managed service factory then creates a unique service instance for each <InstanceID> that it finds.
JBI component configuration Copy linkLink copied to clipboard!
InstallDir/etc folder may contain a number of configuration files for the JBI components that ship with Red Hat JBoss Fuse.
org.apache.servicemix.components.ComponentName.cfg. For example, you would configure the JMS component using a file called org.apache.servicemix.components.jms.cfg.
12.2. Setting OSGi Framework and Initial Container Properties Copy linkLink copied to clipboard!
| Revision History | |
|---|---|
| 09/11/2012 | |
| Added overview and clarified what these properties are used for | |
Overview Copy linkLink copied to clipboard!
etc folder:
config.properties—specifies the bootstrap properties for the OSGi frameworksystem.properties—specifies properties to configure container functions
OSGi framework properties Copy linkLink copied to clipboard!
etc/config.properties file contains the properties used to specify which OSGi framework implementation to load and properties for configuring the framework's behaviors. Table 12.2, “Properties for the OSGi Framework” describes the key properties to set.
| Property | Description |
|---|---|
| karaf.framework | Specifies the OSGi framework that Red Hat JBoss Fuse uses. The default framework is Apache Felix which is specified using the value felix. |
| karaf.framework.felix | Specifies the path to the Apache Felix JAR on the file system. |
Initial container properties Copy linkLink copied to clipboard!
etc/system.properties file contains properties that configure how various aspects of the container behave including:
- the container's name
- the default feature repository used by the container
- the default port used by the OSGi HTTP service
- the initial message broker configuration
| Property | Description |
|---|---|
| karaf.name | Specifies the name of this container. The default is root. |
| karaf.default.repository | Specifies the location of the feature repository the container will use by default. The default setting is the local feature repository installed with JBoss Fuse. |
| org.osgi.service.http.port | Specifies the default port for the OSGi HTTP Service. |
12.3. Configuring Standalone Containers Using the Command Console Copy linkLink copied to clipboard!
| Revision History | |
|---|---|
| 09/11/2012 | |
| Clarified the focus that this content was only for non-fabric containers | |
Overview Copy linkLink copied to clipboard!
Listing the current configuration Copy linkLink copied to clipboard!
Example 12.1. Output of the config:list Command
...
---------------------------------------------------------------- Pid: org.ops4j.pax.logging BundleLocation: mvn:org.ops4j.pax.logging/pax-logging-service/1.4 Properties: log4j.appender.out.layout.ConversionPattern = %d{ABSOLUTE} | %-5.5p | %-16.16 t | %-32.32c{1} | %-32.32C %4L | %m%n felix.fileinstall.filename = org.ops4j.pax.logging.cfg service.pid = org.ops4j.pax.logging log4j.appender.stdout.layout.ConversionPattern = %d{ABSOLUTE} | %-5.5p | %-16 .16t | %-32.32c{1} | %-32.32C %4L | %m%n log4j.appender.out.layout = org.apache.log4j.PatternLayout log4j.rootLogger = INFO, out, osgi:VmLogAppender log4j.appender.stdout.layout = org.apache.log4j.PatternLayout log4j.appender.out.file = C:\apache\apache-servicemix-6.0.0.redhat-024/data/log/karaf.log log4j.appender.stdout = org.apache.log4j.ConsoleAppender log4j.appender.out.append = true log4j.appender.out = org.apache.log4j.FileAppender ---------------------------------------------------------------- Pid: org.ops4j.pax.web BundleLocation: mvn:org.ops4j.pax.web/pax-web-runtime/0.7.1 Properties: org.apache.karaf.features.configKey = org.ops4j.pax.web service.pid = org.ops4j.pax.web org.osgi.service.http.port = 8181 ----------------------------------------------------------------
...
...
---------------------------------------------------------------- Pid: org.ops4j.pax.logging BundleLocation: mvn:org.ops4j.pax.logging/pax-logging-service/1.4 Properties: log4j.appender.out.layout.ConversionPattern = %d{ABSOLUTE} | %-5.5p | %-16.16 t | %-32.32c{1} | %-32.32C %4L | %m%n felix.fileinstall.filename = org.ops4j.pax.logging.cfg service.pid = org.ops4j.pax.logging log4j.appender.stdout.layout.ConversionPattern = %d{ABSOLUTE} | %-5.5p | %-16 .16t | %-32.32c{1} | %-32.32C %4L | %m%n log4j.appender.out.layout = org.apache.log4j.PatternLayout log4j.rootLogger = INFO, out, osgi:VmLogAppender log4j.appender.stdout.layout = org.apache.log4j.PatternLayout log4j.appender.out.file = C:\apache\apache-servicemix-6.0.0.redhat-024/data/log/karaf.log log4j.appender.stdout = org.apache.log4j.ConsoleAppender log4j.appender.out.append = true log4j.appender.out = org.apache.log4j.FileAppender ---------------------------------------------------------------- Pid: org.ops4j.pax.web BundleLocation: mvn:org.ops4j.pax.web/pax-web-runtime/0.7.1 Properties: org.apache.karaf.features.configKey = org.ops4j.pax.web service.pid = org.ops4j.pax.web org.osgi.service.http.port = 8181 ----------------------------------------------------------------
...
Editing the configuration Copy linkLink copied to clipboard!
- Start an editing session by typing
config:edit PID.PID is the PID for the configuration you are editing. It must be entered exactly. If it does not match the desired PID, the container will create a new PID with the specified name. - Remind yourself of the available properties in a particular configuration by typing
config:proplist. - Use one of the editing commands to change the properties in the configuration.The editing commands include:
- config:propappend—appends a new property to the configuration
- config:propset—set the value for a configuration property
- config:propdel—delete a property from the configuration
- Update the configuration in memory and save it to disk by typing
config:update.
config:cancel.
Example 12.2. Editing a Configuration
JBossFuse:karaf@root> config:edit org.apache.karaf.log
JBossFuse:karaf@root> config:proplist
service.pid = org.apache.karaf.log size = 500 felix.fileinstall.filename = org.apache.karaf.log.cfg pattern = %d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
JBossFuse:karaf@root> config:propset size 300
JBossFuse:karaf@root> config:update
JBossFuse:karaf@root> config:edit org.apache.karaf.log
JBossFuse:karaf@root> config:proplist
service.pid = org.apache.karaf.log size = 500 felix.fileinstall.filename = org.apache.karaf.log.cfg pattern = %d{ABSOLUTE} | %-5.5p | %-16.16t | %-32.32c{1} | %-32.32C %4L | %m%n
JBossFuse:karaf@root> config:propset size 300
JBossFuse:karaf@root> config:update
12.4. Configuring Fabric Containers Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
Profiles Copy linkLink copied to clipboard!
- the Apache Karaf features to be deployed
- OSGi bundles to be deployed
- the feature repositories to be scanned for features
- properties that configure the container's runtime behavior
Best practices Copy linkLink copied to clipboard!
Making changes using the command console Copy linkLink copied to clipboard!
- fabric:version-create—create a new version
- fabric:profile-create—create a new profile
- fabric:profile-edit—edit the properties in a profile
- fabric:container-change-profile—change the profiles assigned to a container
Example 12.3. Editing Fabric Profile
JBossFuse:karaf@root> fabric:version-create Created version: 1.1 as copy of: 1.0 JBossFuse:karaf@root> fabric:profile-edit -p org.apache.karaf.log/size=300 NEBroker
JBossFuse:karaf@root> fabric:version-create
Created version: 1.1 as copy of: 1.0
JBossFuse:karaf@root> fabric:profile-edit -p org.apache.karaf.log/size=300 NEBroker
Using the management console Copy linkLink copied to clipboard!
Chapter 13. Configuring the Hot Deployment System Copy linkLink copied to clipboard!
Abstract
Overview Copy linkLink copied to clipboard!
org.apache.felix.fileinstall-deploy PID.
Specifying the hot deployment folder Copy linkLink copied to clipboard!
deploy folder that is relative to the folder from which you launched the container. You change the folder the container monitors by setting the felix.fileinstall.dir property in the rg.apache.felix.fileinstall-deploy PID. The value is the absolute path of the folder to monitor. If you set the value to /home/joe/deploy, the container will monitor a folder in Joe's home directory.
Specifying the scan interval Copy linkLink copied to clipboard!
org.apache.felix.fileinstall-deploy PID. The value is specified in milliseconds.
Example Copy linkLink copied to clipboard!
/home/smx/jbideploy as the hot deployment folder and sets the scan interval to half a second.
Example 13.1. Configuring the Hot Deployment Folders
JBossFuse:karaf@root> config:edit org.apache.felix.fileinstall-deploy JBossFuse:karaf@root> config:propset felix.fileinstall.dir /home/smx/jbideploy JBossFuse:karaf@root> config:propset felix.fileinstall.poll 500 JBossFuse:karaf@root> config:update
JBossFuse:karaf@root> config:edit org.apache.felix.fileinstall-deploy
JBossFuse:karaf@root> config:propset felix.fileinstall.dir /home/smx/jbideploy
JBossFuse:karaf@root> config:propset felix.fileinstall.poll 500
JBossFuse:karaf@root> config:update
Chapter 14. Configuring JMX Copy linkLink copied to clipboard!
Abstract
Overview Copy linkLink copied to clipboard!
org.apache.karaf.management PID.
Changing the RMI port and JMX URL Copy linkLink copied to clipboard!
| Property | Description |
|---|---|
| rmiRegistryPort | Specifies the RMI registry port. The default value is 1099. |
| serviceUrl | Specifies the the URL used to connect to the JMX server. The default URL is service:jmx:rmi:///jndi/rmi://localhost:1099/karaf-KarafName, where KarafName is the container's name (by default, root). |
Setting the JMX username and password Copy linkLink copied to clipboard!
admin and the default password is admin.
Troubleshooting on Linux platforms Copy linkLink copied to clipboard!
- Check that the hostname resolves to the correct IP address. For example, if the
hostname -icommand returns 127.0.0.1, JConsole will not be able to connect to the JMX server. To fix this, edit the/etc/hostsfile so that the hostname resolves to the correct IP address. - Check whether the Linux machine is configured to accept packets from the host where JConsole is running (packet filtering is built in the Linux kernel). You can enter the command,
/sbin/iptables --list, to determine whether an external client is allowed to connect to the JMX server.Use the following command to add a rule to allow an external client such as JConsole to connect:/usr/sbin/iptables -I INPUT -s JconsoleHost -p tcp --destination-port JMXRemotePort -j ACCEPT
/usr/sbin/iptables -I INPUT -s JconsoleHost -p tcp --destination-port JMXRemotePort -j ACCEPTCopy to Clipboard Copied! Toggle word wrap Toggle overflow Where JconsoleHost is either the hostname or the IP address of the host on which JConsole is running and JMXRemotePort is the IP port exposed by the JMX server.
Chapter 15. Configuring JAAS Security Copy linkLink copied to clipboard!
15.1. Alternative JAAS Realms Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
Default realm Copy linkLink copied to clipboard!
karaf realm name. The standard administration services in JBoss Fuse (SSH remote console, JMX port, and so on) are all configured to use the karaf realm by default.
Available realm implementations Copy linkLink copied to clipboard!
Standalone JAAS realm Copy linkLink copied to clipboard!
karaf realm installs two JAAS login modules, which are used in parallel:
PropertiesLoginModule- Authenticates username/password credentials and stores the secure user data in the
InstallDir/etc/users.propertiesfile. PublickeyLoginModule- Authenticates SSH key-based credentials (consisting of a username and a public/private key pair). Secure user data is stored in the
InstallDir/etc/keys.propertiesfile.
Fabric JAAS realm Copy linkLink copied to clipboard!
karaf realm based on the ZookeeperLoginModule login module is automatically installed in every container (the fabric-jaas feature is included in the default profile) and is responsible for securing the SSH remote console and other administrative services. The Zookeeper login module stores the secure user data in the Fabric Registry.
karaf realm with a higher rank.
LDAP JAAS realm Copy linkLink copied to clipboard!
15.2. JAAS Console Commands Copy linkLink copied to clipboard!
Editing user data from the console Copy linkLink copied to clipboard!
jaas:* console commands, which you can use to edit JAAS user data from the console.
jaas:* console commands are not compatible with the LDAP JAAS module.
Standalone realm configuration Copy linkLink copied to clipboard!
PropertiesLoginModule and the PublickeyLoginModule) maintains its own database of secure user data, independently of any other containers. To configure the user data for a standalone container, you must log into the specific container (see Connecting and Disconnecting Remotely) whose data you want to modify. Each standalone container must be configured separately.
jaas:realms command, as follows:
JBossFuse:karaf@root> jaas:realms
Index Realm Module Class
1 karaf org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
2 karaf org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
JBossFuse:karaf@root> jaas:realms
Index Realm Module Class
1 karaf org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
2 karaf org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule
karaf JAAS realm. Enter the following console command to start editing the properties login module in the karaf realm:
JBossFuse:karaf@root> jaas:manage --index 1
JBossFuse:karaf@root> jaas:manage --index 1
Adding a new user to the JAAS realm Copy linkLink copied to clipboard!
jdoe, to the JAAS realm.
- List the available realms and login modules by entering the following command:
JBossFuse:karaf@root> jaas:realms
JBossFuse:karaf@root> jaas:realmsCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Choose the login module to edit by specifying its index, Index, using a command of the following form:
JBossFuse:karaf@root> jaas:manage --index Index
JBossFuse:karaf@root> jaas:manage --index IndexCopy to Clipboard Copied! Toggle word wrap Toggle overflow
jdoe, with password, secret, by entering the following console command:
JBossFuse:karaf@root> jaas:useradd jdoe secret
JBossFuse:karaf@root> jaas:useradd jdoe secret
admin role to jdoe, by entering the following console command:
JBossFuse:karaf@root> jaas:roleadd jdoe admin
JBossFuse:karaf@root> jaas:roleadd jdoe admin
jaas:pending console command, as follows:
JBossFuse:karaf@root> jaas:pending
Jaas Realm:karaf Jaas Module:org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
UserAddCommand{username='jdoe', password='secret'}
RoleAddCommand{username='jdoe', role='admin'}
JBossFuse:karaf@root> jaas:pending
Jaas Realm:karaf Jaas Module:org.apache.karaf.jaas.modules.properties.PropertiesLoginModule
UserAddCommand{username='jdoe', password='secret'}
RoleAddCommand{username='jdoe', role='admin'}
jaas:update, as follows:
JBossFuse:karaf@root> jaas:update
JBossFuse:karaf@root> jaas:update
etc/users.properties file, in the case of a standalone container, or by storing the user data in the Fabric Registry, in the case of a fabric).
Canceling pending changes Copy linkLink copied to clipboard!
jaas:update command, you could abort the pending changes using the jaas:cancel command, as follows:
JBossFuse:karaf@root> jaas:cancel
JBossFuse:karaf@root> jaas:cancel
15.3. Standalone Realm Properties File Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
PropertiesLoginModule JAAS module. This login module stores its user data in a Java properties file in the following location:
InstallDir/etc/users.properties
InstallDir/etc/users.properties
Format of users.properties entries Copy linkLink copied to clipboard!
etc/users.properties file has the following format (on its own line):
Username=Password,Role1,Role2,...
Username=Password,Role1,Role2,...
Changing the default username and password Copy linkLink copied to clipboard!
etc/users.properties file initially contains a commented out entry for a single user, smx, with password smx and role admin. It is strongly recommended that you create a new user entry that is different from the smx user example.
Username=Password,admin
Username=Password,admin
admin role grants full administration privileges to this user.
Chapter 16. Securing Fabric Containers Copy linkLink copied to clipboard!
Abstract
karaf JAAS realm. This realm is defined in the fabric-jaas feature. It is deployed to all containers in the fabric as part of the default profile.
karaf JAAS realm to use a proper login module. The fabric containers include an LDAP module that is preloaded and simply needs to be activated. Doing so requires that the new JAAS realm be defined in OSGi blueprint files and deployed to the container's in the fabric.
16.1. Using the Default Authentication System Copy linkLink copied to clipboard!
| Revision History | |
|---|---|
| 12/3/12 | |
| clarified that the default mechanism is the one used by the fabric | |
| 12/3/12 | |
| split into sub-sections for user management and configuring encryption | |
Abstract
16.1.1. Managing Users Copy linkLink copied to clipboard!
Viewing user data Copy linkLink copied to clipboard!
Adding a user Copy linkLink copied to clipboard!
- Click from the main menu.The Users page opens.
- Click .The Create New User dialog opens.
- In the Username field, enter a unique name for the user.The user name must be at least five characters long.
- In the Password field, enter a password for the user.The password must be atleast six characters long.
- In the Repeat Password field, reenter the password for the user.
- Click .The dialog closes and the new user is added to the list.
Removing a user Copy linkLink copied to clipboard!
- Click from the main menu.The Users page opens.
- Select the user to be deleted from the list.
- Click .A confirmation dialog opens.
- Click .The dialog closes and the user is removed from the list.
Changing a user's password Copy linkLink copied to clipboard!
- Click from the main menu.The Users page opens.
- Select the user to update from the list.
- Click .The Change Password dialog opens.
- In the Password field, enter a password for the user.The password must be at least six characters long.
- In the Repeat Password field, reenter the password for the user.
- Click .The dialog closes and a message shows that the password was changed.
Adding a role to a user Copy linkLink copied to clipboard!
- Click from the main menu.The Users page opens.
- Select the user to update from the list.
- Click .The Add New Role dialog opens.
- In the Role Name field, enter a role for the user.
- Click .The dialog closes and a message shows that the role was added.
Deleting a role from a user Copy linkLink copied to clipboard!
- Click from the main menu.The Users page opens.
- Select the user to update from the list.The user's roles are listed on the right side of the page.
- Click the opposite the role to delete.A confirmation dialog opens.
- Click .The dialog closes and the role is removed from the list.
16.1.2. Encrypting Stored Passwords Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
karaf realm. This can be done by adding the appropriate configuration properties to the org.fusesource.fabric.jaas PID and ensuring that they are applied to all of the containers in the fabric.
Editing the default profile Copy linkLink copied to clipboard!
default profile. It is applied to all containers in a fabric through inheritance.
default profile, you should create a new profile version. Editing the active default profile could make your fabric unstable.
default profile:
- Select the management console's Profiles tab.
- Create a new version by clicking .The Create New Version dialog appears.
- Optionally enter a name for the new version in the NameIf you leave the Name field blank, the management console will use the name of the parent version and append the next available version number, starting from 1, to the name. For example, if version
brokers1existed, the management console would create versionbrokers1.1. - From the Parent Version list, select the version from which the new version will originate.By default Use most recently created version is selected.
- Click to create the version.The dialog will close and the new version will be listed in the Versions table.
- Select the new version from the Versions list.
- Select the
defaultprofile from the Profiles list.The Profiles page for the selected profile opens. - Select the Config Files tab.
- Select
org.fusesource.fabric.jaasfrom the list.A text editing window opens. - Enter values for the properties described in Table 16.1, “JAAS Encryption Properties” following the example shown in Example 16.1, “Password Encryption Configuration”.
Example 16.1. Password Encryption Configuration
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Click .
- If you configure the encryption to use Jasypt, add the
jasypt-encryptionfeature to the profile.- Select the Repositories tab.
- In the Add repository field enter
mvn:org.apache.karaf.assemblies.features/standard/2.3.0.fuse-71-044/xml/features. - Click .
- Select the Features tab.
- From the Repository list select mvn:org.apache.karaf.assemblies.features/standard/2.3.0.fuse-71-044/xml/features.
- From the Features list select jasypt-encryption.
- Select the management console's Containers tab.
- Click .
- Click .
- Select the version to which you added encryption from the Target Version table.
- Click .
Configuration properties Copy linkLink copied to clipboard!
| Property | Description |
|---|---|
encryption.enabled | Specifies if password encryption is enabled. |
encryption.name | Specifies the name of the encryption service, which has been registered as an OSGi service. See the section called “Encryption services”. |
encryption.prefix | Specifies the prefix for encrypted passwords. |
encryption.suffix | Specifies the suffix for encrypted passwords. |
encryption.algorithm |
Specifies the name of the encryption algorithm—for example,
MD5 or SHA-1. You can specify one of the following encryption algorithms:
|
encryption.encoding | Specifies the encrypted passwords encoding: hexadecimal or base64. |
encryption.providerName (Jasypt only) | Name of the java.security.Provider instance that is to provide the digest algorithm. |
encryption.providerClassName (Jasypt only) | Specifies the class name of the security provider that is to provide the digest algorithm. |
encryption.iterations (Jasypt only) | Specifies the number of times to apply the hash function recursively. |
encryption.saltSizeBytes (Jasypt only) | Specifies the size of the salt used to compute the digest. |
encryption.saltGeneratorClassName (Jasypt only) | Specifies the class name of the salt generator. |
role.policy | Specifies the policy for identifying role principals. Can have the values, prefix or group. |
role.discriminator | Specifies the discriminator value to be used by the role policy. |
Encryption services Copy linkLink copied to clipboard!
org.apache.karaf.jaas.modules.EncryptionService interface and exporting an instance of the encryption service as an OSGi service. Two alternative implementations of the encryption service are provided:
- Basic encryption service—installed in the standalone container by default and you can reference it by setting the
encryption.nameproperty to the value,basic. In the basic encryption service, the message digest algorithms are provided by the SUN security provider (the default security provider in the Oracle JDK). - Jasypt encryption—can be installed in the standalone container by installing the
jasypt-encryptionfeature. To access the Jasypt encryption service, set theencryption.nameproperty to the value,jasypt.For more information about Jasypt encryption, see the Jasypt documentation.
16.2. Defining JAAS Realms in a Fabric Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
jaas:config element for defining JAAS realms. The difference is that when containers are deployed in a fabric, the JAAS realms need to be pushed out the fabric registry and all of the containers in the fabric need to share the same JAAS realms.
Procedure Copy linkLink copied to clipboard!
- Create a Maven project to package and deploy the JAAS realm to the fabric's Maven proxy as shown in the section called “Creating a Maven project for deploying a JAAS realm”.
- Create a JAAS realm that uses the LDAP login module:
- Open the blueprint XML file in
src/main/resources/OSGI-INF/my-service.xmlin a text editor. - Delete the
beanandserviceelements. - Add a
jaas:configelement to the blueprint.
- Deploy the JAAS realm to the fabric's maven proxy using the mvn deploy command.
- In the management console create a new profile for deploying the new realm.
- Select the Bundles tab.
- Add the bundle you uploaded for the JAAS realm to the profile.Bundles are specified using Maven URLs. For example if your project's group ID is
my.jaas.realmand the artifact ID isjaas, the Maven URL for the bundle will be mvn:my.jaas.realm/ldap/version. - Add the new profile to all of the containers in the fabric.
Creating a Maven project for deploying a JAAS realm Copy linkLink copied to clipboard!
- Use the
karaf-blueprint-archetypearchetype to generate a template project.Example 16.2, “Create a Maven Project” shows how to invoke the archetype from the command line.Example 16.2. Create a Maven Project
mvn archetype:generate -DarchetypeGroupId=org.apache.karaf.archetypes -DarchetypeArtifactId=karaf-blueprint-archetype -DgroupId=groupID -DartifactId=artifactID
mvn archetype:generate -DarchetypeGroupId=org.apache.karaf.archetypes -DarchetypeArtifactId=karaf-blueprint-archetype -DgroupId=groupID -DartifactId=artifactIDCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Remove the project's
src/main/javafolder.This folder holds template Java classes for implementing an OSGi service, but the JAAS realm does not require any Java classes. - Open the project's POM in a text editor.
- Add a
distributionManagementelement, similar to the one shown in Example 16.3, “Fabric Maven Proxy Distribution Settings”, to the POM.Example 16.3. Fabric Maven Proxy Distribution Settings
Copy to Clipboard Copied! Toggle word wrap Toggle overflow You will need to modify theurlelement to include the connection details for your environment:- The username and password are the credentials used access the Fabric Server to which you are trying to connect.
- The hostname,
localhostin Example 16.3, “Fabric Maven Proxy Distribution Settings”, is the address of the machine hosting the Fabric Server. - The port number,
8107in Example 16.3, “Fabric Maven Proxy Distribution Settings”, is the port number exposed by the Fabric Server.8107is the default setting. - The path,
/maven/upload/in Example 16.3, “Fabric Maven Proxy Distribution Settings”, is the same for all Fabric Servers.
16.3. Enabling LDAP Authentication Copy linkLink copied to clipboard!
| Revision History | |
|---|---|
| 12/05/12 | |
| modified the procedure to work in a fabric | |
Abstract
Overview Copy linkLink copied to clipboard!
org.apache.karaf.jaas.modules.ldap.LDAPLoginModule class. It is preloaded by the containers, so you do not need to install its bundle.
karaf realm to use the LDAP login module and deploy it to every container in the management console's fabric. Once this is done, all access to the management console Web console, and all of the fabric containers' command consoles, will be authenticated against your LDAP server.
Procedure Copy linkLink copied to clipboard!
- Create a Maven project to package and deploy the LDAP JAAS realm to the fabric's Maven proxy as shown in the section called “Creating a Maven project for deploying a JAAS realm”.
- Create a JAAS realm that uses the LDAP login module:
- Open the blueprint XML file in
src/main/resources/OSGI-INF/my-service.xmlin a text editor. - Delete the
beanandserviceelements. - Add a
jaas:configelement to the blueprint. - Add a
nameattribute to thejaas:configelement and set its value tokaraf.NoteThis will override the default realm used by the container. - Add a
rankattribute to thejaas:configelement and set its value to5.NoteThis will insure that this realm is used by the container. - Add a
jaas:moduleelement to thejaas:configelement. - Add a
classNameattribute to thejaas:moduleelement and set its value toorg.apache.karaf.jaas.modules.ldap.LDAPLoginModule.Example 16.4, “LDAP JAAS Login Module” shows the blueprint file.Example 16.4. LDAP JAAS Login Module
Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Provide values for the properties described in section "Enabling LDAP Authentication" in "Security Guide".
- Deploy the JAAS realm to the fabric's maven proxy using the mvn deploy command.
- In the management console create a new profile for deploying the LDAP realm.
- Select the Bundles tab.
- Add the bundle you uploaded for the JAAS realm to the profile.Bundles are specified using Maven URLs. For example if your project's group ID is
my.jaas.realmand the artifact ID isldap, the Maven URL for the bundle will be mvn:my.jaas.realm/ldap/version. - Add the new profile to all of the containers in the fabric.
Chapter 17. Logging Copy linkLink copied to clipboard!
Abstract
- Apache Log4j
- Apache Commons Logging
- SLF4J
- Java Util Logging
17.1. Logging Configuration Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
etc/system.properties—the configuration file that sets the logging level during the container’s boot process. The file contains a single property, org.ops4j.pax.logging.DefaultServiceLog.level, that is set toERRORby default.org.ops4j.pax.logging—the PID used to configure the logging back end service. It sets the logging levels for all of the defined loggers and defines the appenders used to generate log output. It uses standard Log4j configuration. By default, it sets the root logger's level toINFOand defines two appenders: one for the console and one for the log file.NoteThe console's appender is disabled by default. To enable it, addlog4j.appender.stdout.append=trueto the configuration For example, to enable the console appender in a standalone container, you would use the following commands:JBossFuse:karaf@root> config:edit org.ops4j.pax.logging JBossFuse:karaf@root> config:propappend log4j.appender.stdout.append true JBossFuse:karaf@root> config:update
JBossFuse:karaf@root> config:edit org.ops4j.pax.logging JBossFuse:karaf@root> config:propappend log4j.appender.stdout.append true JBossFuse:karaf@root> config:updateCopy to Clipboard Copied! Toggle word wrap Toggle overflow org.apache.karaf.log.cfg—configures the output of the log console commands.
Changing the log levels Copy linkLink copied to clipboard!
org.ops4j.pax.logging PID's log4j.rootLogger property so that the logging level is one of the following:
TRACEDEBUGINFOWARNERRORFATALNONE
Example 17.1. Changing Logging Levels
JBossFuse:karaf@root> config:edit org.ops4j.pax.logging JBossFuse:karaf@root> config:propset log4j.rootLogger "DEBUG, out, osgi:VmLogAppender" JBossFuse:karaf@root> config:update
JBossFuse:karaf@root> config:edit org.ops4j.pax.logging
JBossFuse:karaf@root> config:propset log4j.rootLogger "DEBUG, out, osgi:VmLogAppender"
JBossFuse:karaf@root> config:update
Changing the appenders' thresholds Copy linkLink copied to clipboard!
log4j.appender.appenderName.threshold property that controls what level of messages are written to the appender. The appender threshold values are the same as the log level values.
DEBUG but limiting the information displayed on the console to WARN.
Example 17.2. Changing the Log Information Displayed on the Console
JBossFuse:karaf@root> config:edit org.ops4j.pax.logging JBossFuse:karaf@root> config:propset log4j.rootLogger "DEBUG, out, osgi:VmLogAppender" JBossFuse:karaf@root> config:propappend log4j.appender.stdout.threshold WARN JBossFuse:karaf@root> config:update
JBossFuse:karaf@root> config:edit org.ops4j.pax.logging
JBossFuse:karaf@root> config:propset log4j.rootLogger "DEBUG, out, osgi:VmLogAppender"
JBossFuse:karaf@root> config:propappend log4j.appender.stdout.threshold WARN
JBossFuse:karaf@root> config:update
Logging per bundle Copy linkLink copied to clipboard!
sift appender to the Log4j root logger as shown in Example 17.3, “Enabling Per Bundle Logging”.
Example 17.3. Enabling Per Bundle Logging
JBossFuse:karaf@root> config:edit org.ops4j.pax.logging JBossFuse:karaf@root> config:propset log4j.rootLogger "INFO, out, sift, osgi:VmLogAppender" JBossFuse:karaf@root> config:update
JBossFuse:karaf@root> config:edit org.ops4j.pax.logging
JBossFuse:karaf@root> config:propset log4j.rootLogger "INFO, out, sift, osgi:VmLogAppender"
JBossFuse:karaf@root> config:update
data/log/BundleName.log.
org.ops4j.pax.logging.cfg.
17.2. Logging per Application Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
Application key Copy linkLink copied to clipboard!
Enabling per application logging Copy linkLink copied to clipboard!
- In each of your applications, edit the Java source code to define a unique application key.If you are using slf4j, add the following static method call to your application:
org.slf4j.MDC.put("app.name","MyFooApp");org.slf4j.MDC.put("app.name","MyFooApp");Copy to Clipboard Copied! Toggle word wrap Toggle overflow If you are using log4j, add the following static method call to your application:org.apache.log4j.MDC.put("app.name","MyFooApp");org.apache.log4j.MDC.put("app.name","MyFooApp");Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Edit the
etc/org.ops4j.pax.loggingPID to customize the sift appender.- Set
log4j.appender.sift.keytoapp.name. - Set
log4j.appender.sift.appender.fileto=${karaf.data}/log/$\\{app.name\\}.log.
- Edit the
etc/org.ops4j.pax.loggingPID to add the sift appender to the root logger.JBossFuse:karaf@root> config:edit org.ops4j.pax.logging JBossFuse:karaf@root> config:propset log4j.rootLogger "INFO, out, sift, osgi:VmLogAppender" JBossFuse:karaf@root> config:update
JBossFuse:karaf@root> config:edit org.ops4j.pax.logging JBossFuse:karaf@root> config:propset log4j.rootLogger "INFO, out, sift, osgi:VmLogAppender" JBossFuse:karaf@root> config:updateCopy to Clipboard Copied! Toggle word wrap Toggle overflow
17.3. Log Commands Copy linkLink copied to clipboard!
- log:display
- Displays the most recent log entries. By default, the number of entries returned and the pattern of the output depends on the size and pattern properties in the
org.apache.karaf.log.cfgfile. You can override these using the-pand-darguments. - log:display-exception
- Displays the most recently logged exception.
- log:get
- Displays the current log level.
- log:set
- Sets the log level.
- log:tail
- Continuously display log entries .
- log:clear
- Clear log entries.
Chapter 18. Persistence Copy linkLink copied to clipboard!
Abstract
Overview Copy linkLink copied to clipboard!
data folder in the directory from which you launch the container. This folder is populated by folders storing information about the message broker used by the container, the OSGi framework, and the JBI container.
The data folder Copy linkLink copied to clipboard!
data folder is used by the JBoss Fuse runtime to store persistent state information. It contains the following folders:
activemq- Contains persistent data needed by any Apache ActiveMQ brokers that are started by the container.
cache- The OSGi bundle cache. The cache contains a directory for each bundle, where the directory name corresponds to the bundle identifier number.
generated-bundles- Contains bundles that are generated by the container. Typically these are to support deployed JBI artifacts.
jbi- Contains a subdirectory for each JBI artifact deployed to the JBoss Fuse runtime. For JBI components the folder's name is generated by the component's name. For JBI service assemblies, the folder's name is the identifier of the bundle generated to support the service assembly.
log- Contains the log files.
maven- A temporary directory used by the Fabric Maven Proxy when uploading files.
txlog- Contains the log files used by the transaction management system. You can set the location of this directory in the
org.apache.aries.transaction.cfgfile
Changing the bundle cache location Copy linkLink copied to clipboard!
InstallDir/data/cache.
config.properties.
Flushing the bundle cache Copy linkLink copied to clipboard!
config.properties. This property is set to none by default.
Changing the generated-bundle cache location Copy linkLink copied to clipboard!
org.apache.felix.fileinstall-deploy.cfg file.
Adjusting the bundle cache buffer Copy linkLink copied to clipboard!
config.properties configuration file. The value is specified in bytes.
Chapter 19. Failover Deployments Copy linkLink copied to clipboard!
Abstract
19.1. Using a Simple Lock File System Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
Configuring a lock file system Copy linkLink copied to clipboard!
etc/system.properties file on both the master and the slave installation to include the properties in Example 19.1, “Lock File Failover Configuration”.
Example 19.1. Lock File Failover Configuration
karaf.lock=true karaf.lock.class=org.apache.karaf.main.SimpleFileLock karaf.lock.dir=PathToLockFileDirectory karaf.lock.delay=10000
karaf.lock=true
karaf.lock.class=org.apache.karaf.main.SimpleFileLock
karaf.lock.dir=PathToLockFileDirectory
karaf.lock.delay=10000
- karaf.lock—specifies whether the lock file is written.
- karaf.lock.class—specifies the Java class implementing the lock. For a simple file lock it should always be
org.apache.karaf.main.SimpleFileLock. - karaf.lock.dir—specifies the directory into which the lock file is written. This must be the same for both the master and the slave installation.
- karaf.lock.delay—specifies, in milliseconds, the delay between attempts to reaquire the lock.
19.2. Using a JDBC Lock System Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
Adding the JDBC driver to the classpath Copy linkLink copied to clipboard!
- Copy the JDBC driver JAR file to the
ESBInstallDir/libdirectory for each Red Hat JBoss Fuse instance. - Modify the
bin/karafstart script so that it includes the JDBC driver JAR in itsCLASSPATHvariable.For example, given the JDBC JAR file,JDBCJarFile.jar, you could modify the start script as follows (on a *NIX operating system):Copy to Clipboard Copied! Toggle word wrap Toggle overflow NoteIf you are adding a MySQL driver JAR or a PostgreSQL driver JAR, you must rename the driver JAR by prefixing it with thekaraf-prefix. Otherwise, Apache Karaf will hang and the log will tell you that Apache Karaf was unable to find the driver.
Configuring a JDBC lock system Copy linkLink copied to clipboard!
etc/system.properties file for each instance in the master/slave deployment as shown
Example 19.2. JDBC Lock File Configuration
Configuring JDBC locking on Oracle Copy linkLink copied to clipboard!
etc/system.properties file must point to org.apache.karaf.main.OracleJDBCLock.
system.properties file as normal for your setup, as shown:
Example 19.3. JDBC Lock File Configuration for Oracle
Configuring JDBC locking on Derby Copy linkLink copied to clipboard!
etc/system.properties file should point to org.apache.karaf.main.DerbyJDBCLock. For example, you could configure the system.properties file as shown:
Example 19.4. JDBC Lock File Configuration for Derby
Configuring JDBC locking on MySQL Copy linkLink copied to clipboard!
etc/system.properties file must point to org.apache.karaf.main.MySQLJDBCLock. For example, you could configure the system.properties file as shown:
Example 19.5. JDBC Lock File Configuration for MySQL
Configuring JDBC locking on PostgreSQL Copy linkLink copied to clipboard!
etc/system.properties file must point to org.apache.karaf.main.PostgreSQLJDBCLock. For example, you could configure the system.properties file as shown:
Example 19.6. JDBC Lock File Configuration for PostgreSQL
JDBC lock classes Copy linkLink copied to clipboard!
org.apache.karaf.main.DefaultJDBCLock org.apache.karaf.main.DerbyJDBCLock org.apache.karaf.main.MySQLJDBCLock org.apache.karaf.main.OracleJDBCLock org.apache.karaf.main.PostgreSQLJDBCLock
org.apache.karaf.main.DefaultJDBCLock
org.apache.karaf.main.DerbyJDBCLock
org.apache.karaf.main.MySQLJDBCLock
org.apache.karaf.main.OracleJDBCLock
org.apache.karaf.main.PostgreSQLJDBCLock
19.3. Container-level Locking Copy linkLink copied to clipboard!
Overview Copy linkLink copied to clipboard!
Configuring container-level locking Copy linkLink copied to clipboard!
etc/system.properties file on each system in the master/slave setup:
Example 19.7. Container-level Locking Configuration
karaf.lock=true karaf.lock.level=50 karaf.lock.delay=10
karaf.lock=true
karaf.lock.level=50
karaf.lock.delay=10
etc/startup.properties, in the format BundleName.jar=level. The core system bundles have levels below 50, where as user bundles have levels greater than 50.
| Start Level | Behavior |
|---|---|
| 1 | A 'cold' standby instance. Core bundles are not loaded into container. Slaves will wait until lock acquired to start server. |
| <50 | A 'hot' standby instance. Core bundles are loaded into the container. Slaves will wait until lock acquired to start user level bundles. The console will be accessible for each slave instance at this level. |
| >50 | This setting is not recommended as user bundles will be started. |
Avoiding port conflicts Copy linkLink copied to clipboard!
servicemix start script (or the karaf script on a child instance) to include the following:
DEFAULT_JAVA_OPTS="-server $DEFAULT_JAVA_OPTS -Dcom.sun.management.jmxremote.port=1100 -Dcom.sun.management.jmxremote.authenticate=false"
DEFAULT_JAVA_OPTS="-server $DEFAULT_JAVA_OPTS -Dcom.sun.management.jmxremote.port=1100 -Dcom.sun.management.jmxremote.authenticate=false"
Chapter 20. Configuring JBI Component Thread Pools Copy linkLink copied to clipboard!
Abstract
Overview Copy linkLink copied to clipboard!
Component configuration PIDs Copy linkLink copied to clipboard!
org.apache.servicemix.components.ComponentName.
Thread pool properties Copy linkLink copied to clipboard!
| Property | Default | Description |
|---|---|---|
| corePoolSize | 8 | Specifies the minimum number of threads in a thread pool. If the number of available threads drops below this limit, the runtime will always create a new thread to handle the job. |
| maximumPoolSize | 32 | Specifies the maximum number of threads in a thread pool. Setting this property to -1 specifies that it is unbounded. |
| queueSize | 256 | Specifies the number of jobs allowed in a component's job queue. |
Thread selection Copy linkLink copied to clipboard!
- If the component's thread pool is smaller than the corePoolSize, a new thread is created to process the task.
- If less than queueSize jobs are in the component's job queue, the task is placed on the queue to wait for a free thread.
- If the component's job queue is full and the thread pool has less than maximumPoolSize threads instantiated, a new thread is created to process the task.
- The job is processed by the current thread.
Example Copy linkLink copied to clipboard!
Example 20.1. Component Thread Pool Configuration
corePoolSize = 10 maximumPoolSize = 200 ...
corePoolSize = 10
maximumPoolSize = 200
...
Chapter 21. Applying Patches Copy linkLink copied to clipboard!
Abstract
.patch file that lists the contained artifacts. The artifacts are typically one or more bundles. They can, however, include configuration files and feature descriptors.
- Customer Support sends you a patch.
- Customer Support sends you a link to download a patch.
- standalone—the container's command console's patch shell has commands for managing the patching process
- fabric—patching a fabric requires applying the patch to a profile and then applying the profile to a containerThe management console is the recommended way to patch containers in a fabric. See Using the Management Consolefor more information.
21.1. Patching a Standalone Container Copy linkLink copied to clipboard!
Abstract
Overview Copy linkLink copied to clipboard!
system folder. When the patch is applied, the container's configuration is changed so that it points to the patched artifacts instead of the artifacts from the original installation. This makes it easy for the system to be restored to its original state or to selectively back out patches.
Applying a patch Copy linkLink copied to clipboard!
- Add the patch to the container's environment using the section "Arguments" in "Console Reference" command.Example 21.1, “Adding a Patch to a Broker's Environment” shows the command for adding the patch contained in the patch file
patch.zipfrom the local file system.Example 21.1. Adding a Patch to a Broker's Environment
JBossA-MQ> patch:add file://patch.zip
JBossA-MQ> patch:add file://patch.zipCopy to Clipboard Copied! Toggle word wrap Toggle overflow This command copies the specified patch file to the container'ssystemfolder and unpacks it. - Simulate installing the patch using the section "Arguments" in "Console Reference" command.This will generate a log of the changes that will be made to the container when the patch is installed, but will not make any actual changes to the container.NoteThe section "Arguments" in "Console Reference" command displays a list of all patches added to the container's
systemfolder. - Review the simulation log to understand the changes that will be made to the container.
- Apply the patch to the container using the section "Arguments" in "Console Reference" command.WarningRunning patch:install before the container is fully started and all of the bundles are active will cause the container to hang.NoteThe section "Arguments" in "Console Reference" command displays a list of all patches added to the container's
systemfolder.
Rolling back a patch Copy linkLink copied to clipboard!
Example 21.2. Rolling Back a Patch
JBossA-MQ> patch:rollback patch1
JBossA-MQ> patch:rollback patch1
system folder.
21.2. Patching a Container in a Fabric Copy linkLink copied to clipboard!
Abstract
Overview Copy linkLink copied to clipboard!
Procedure Copy linkLink copied to clipboard!
- Getting a patch file.
- Customer Support sends you a patch.
- Customer Support sends you a link to download a patch.
- You, or your organization, generate a patch file for an internally created application.
- Uploading one or more patch files to the fabric's Maven repository.
- Applying the patch(es) to a profile version.This creates a new profile version that points to the new versions of the patched bundles and repositories.
- Migrate one or two containers to the patched profile version to ensure that the patch does not introduce any new issues.
- After you are certain that the patch works, migrate the remaining containers in the fabric to the patched version.
Using the management console Copy linkLink copied to clipboard!
Using the command console Copy linkLink copied to clipboard!
- Upload the patch file to the fabric's Maven repository.
- Create a new profile version to which the patch will be applied.
- Modify all of the profiles in the new version which require the patch.
- Use the fabric:container-upgrade command to roll the patch out to the containers running in the fabric.
Applying patches P3 or later to JBoss Fuse A-MQ 6.0 Copy linkLink copied to clipboard!
fabric-agent bundle that resolves a patching bug. This is applicable only to fabric environments and the patch must be applied before applying any patch P3 or higher. Once a container has been patched with the P3 prerequisite patch, it does not need to be installed again before applying any new patches.
- Apply the P3 prerequisite patch, using the patching process described in this section.
- Apply the P3 patch, using the patching process described in this section.
Applying rollup patches to JBoss Fuse A-MQ 6.0 Copy linkLink copied to clipboard!
Chapter 22. Configuring a Fabric's Maven Proxy Copy linkLink copied to clipboard!
Abstract
Overview Copy linkLink copied to clipboard!
Default repositories Copy linkLink copied to clipboard!
- Maven Central (http://repo1.maven.org/maven2)
- Fuse Releases (http://repo.fusesource.com/nexus/content/repositories/releases)
- Fuse Early Access (http://repo.fusesource.com/nexus/content/groups/ea)
- SpringSource (http://repository.springsource.com/maven/bundles/release, http://repository.springsource.com/maven/bundles/external)
- Scala Tools (http://scala-tools.org/repo-releases)
- User's Local (~/.m2/repository)
Changing the repositories Copy linkLink copied to clipboard!
- Create a new profile version.From the command console this is done using the fabric:version-create command. See section "Description" in "Console Reference" for more information.
- Change the
org.ops4j.pax.url.mvn.repositoriesproperty in theorg.fusesource.fabric.agentPID of thedefaultprofile. Example 22.1, “Configuring the Maven Proxy URL” shows the console command for editing this property.Example 22.1. Configuring the Maven Proxy URL
JBossFuse:karaf@root> fabric:profile-edit -p org.fusesource.fabric.agent/org.ops4j.pax.url.mvn.repositories= \ http://repo1.maven.org/maven2, \ http://repo.fusesource.com/nexus/content/repositories/releases, \ http://repo.fusesource.com/nexus/content/groups/ea, \ http://repository.springsource.com/maven/bundles/release, \ http://repository.springsource.com/maven/bundles/external, \ http://scala-tools.org/repo-releases default
JBossFuse:karaf@root> fabric:profile-edit -p org.fusesource.fabric.agent/org.ops4j.pax.url.mvn.repositories= \ http://repo1.maven.org/maven2, \ http://repo.fusesource.com/nexus/content/repositories/releases, \ http://repo.fusesource.com/nexus/content/groups/ea, \ http://repository.springsource.com/maven/bundles/release, \ http://repository.springsource.com/maven/bundles/external, \ http://scala-tools.org/repo-releases defaultCopy to Clipboard Copied! Toggle word wrap Toggle overflow NoteTheorg.fusesource.fabric.agentPID is refined in all of the fabric profiles. Setting the proxy URL, theorg.ops4j.pax.url.mvn.repositoriesproperty, in thedefaultprofile ensures that all of the other fabric profiles share the same Maven proxy setting.ImportantThefabricprofile'sorg.fusesource.fabric.mavenPID, which ultimately controls the Maven proxy, imports its value from thedefaultprofile'sorg.fusesource.fabric.agentPID. You should not change the settings of theorg.fusesource.fabric.mavenPID. - Roll the changes out the fabric by upgrading the containers to the new profile version.ImportantYou cannot test this configuration change out on a few containers to validate it. The change must be made to the entire fabric or it will result in conflicts.
Index Copy linkLink copied to clipboard!
A
- admin commands, Using the admin console commands
B
- broker
- deploying
- fabric container, Fabric containers
- standalone container, Standalone containers
- bundle cache, Changing the bundle cache location
C
- child containers, Managing Child Containers
- config shell, Standalone containers
- config.properties, OSGi framework properties, Overview
- config:list, Listing the current configuration
- configuration
F
- fabric shell, Fabric containers
- fabric:container-stop, Shutting Down a Fabric
- fabric:container-upgrade, Using the command console
- fabric:join, Joining a Fabric
- fabric:mq-create, Fabric containers
- failover, Failover Deployments
- featureRepositories, Modifying the default set of feature URLs
- featuresBoot, Modifying the default installed features
- felix.cache.bufsize, Adjusting the bundle cache buffer
- felix.fileinstall.dir, Specifying the hot deployment folder
- felix.fileinstall.poll, Specifying the scan interval
- felix.fileinstall.tmpdir, Changing the generated-bundle cache location
G
- generated bundle cache, Changing the generated-bundle cache location
H
- hot deployment
- folder, Specifying the hot deployment folder
- monitor interval, Specifying the scan interval
- HTTPS
- client authentication needed, Enabling HTTPS
- client authentication wanted, Enabling HTTPS
- HTTPS configuration, Enabling HTTPS
J
- JBI
- configuration, JBI component configuration
- JDBC lock, Using a JDBC Lock System
- JMX configuration
K
- karaf.default.repository, Initial container properties
- karaf.framework, OSGi framework properties
- karaf.framework.felix, OSGi framework properties
- karaf.name, Initial container properties
- KARAF_BASE, Specifying the Red Hat JBoss Fuse's environment
- KARAF_DATA, Specifying the Red Hat JBoss Fuse's environment
- KARAF_HOME, Specifying the Red Hat JBoss Fuse's environment
L
- launching
- client mode, Launching the runtime in client mode
- default mode, Launching the runtime
- server mode, Launching the runtime in server mode
- LDAP
- enabling, Enabling LDAP Authentication
- LDAPLoginModule, Enabling LDAP Authentication
- lock file, Using a Simple Lock File System
- logging
- commands, Log Commands
M
- mq-create, Fabric containers
O
- org.apache.felix.fileinstall-deploy, Overview
- org.apache.karaf.log, Overview
- org.fusesource.fabric.agent, Changing the repositories
- org.fusesource.fabric.maven, Changing the repositories
- org.ops4j.pax.logging, Overview
- org.ops4j.pax.logging.DefaultServiceLog.level, Overview
- org.ops4j.pax.url.mvn.repositories, Changing the repositories
- org.ops4j.pax.web.ssl.clientauthneeded, Enabling HTTPS
- org.ops4j.pax.web.ssl.clientauthwanted, Enabling HTTPS
- org.ops4j.pax.web.ssl.keypassword, Enabling HTTPS
- org.ops4j.pax.web.ssl.keystore, Enabling HTTPS
- org.ops4j.pax.web.ssl.keystore.type, Enabling HTTPS
- org.ops4j.pax.web.ssl.password, Enabling HTTPS
- org.osgi.framework.storage, Changing the bundle cache location
- org.osgi.framework.storage.clean, Flushing the bundle cache
- org.osgi.service.http.enabled, Enabling HTTPS
- org.osgi.service.http.port, Initial container properties
- org.osgi.service.http.port.secure, Enabling HTTPS
- org.osgi.service.http.secure.enabled, Enabling HTTPS
- OSGi
- configuration, Introducing Red Hat JBoss Fuse Configuration
- OSGi configuration
- creating, Standalone containers
- OSGi framework
- configuring, OSGi framework properties
P
- patch:add, Applying a patch
- patch:install, Applying a patch
- patch:list, Applying a patch, Rolling back a patch
- patch:rollback, Rolling back a patch
- patch:simulate, Applying a patch
- patching
- fabric
- command console, Using the command console
- management console, Using the management console
- standalone, Applying a patch
- rollback, Rolling back a patch
- profile
- creating, Fabric containers
R
- remote client, Using the remote client
- remote console
- remoteShellLocation, Configuring a container for remote access
- RMI port, Changing the RMI port and JMX URL
- RMI registry
- port number, Changing the RMI port and JMX URL
- rmiRegistryPort, Changing the RMI port and JMX URL
S
- security, Configuring JAAS Security
- service wrapper
- classpath, Adding classpath entries
- JMX configuration, JMX configuration
- JVM properties, Passing parameters to the JVM
- logging, Configuring logging
- serviceUrl, Changing the RMI port and JMX URL
- standalone
- initial features, Configuring the Initial Features in a Standalone Container
- starting, Starting Red Hat JBoss Fuse
- stopping, Stopping Red Hat JBoss Fuse
- remote container, Stopping a Remote Container
- system service
- Redhat, Redhat Linux
- Ubuntu, Ubuntu Linux
- Windows, Windows
- system.properties, Initial container properties
X
- X.509
- configuration, Enabling HTTPS
Legal Notice Copy linkLink copied to clipboard!
Trademark Disclaimer
Legal Notice Copy linkLink copied to clipboard!
Third Party Acknowledgements
- JLine (http://jline.sourceforge.net) jline:jline:jar:1.0License: BSD (LICENSE.txt) - Copyright (c) 2002-2006, Marc Prud'hommeaux
mwp1@cornell.eduAll rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of JLine nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - Stax2 API (http://woodstox.codehaus.org/StAX2) org.codehaus.woodstox:stax2-api:jar:3.1.1License: The BSD License (http://www.opensource.org/licenses/bsd-license.php)Copyright (c) <YEAR>, <OWNER> All rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - jibx-run - JiBX runtime (http://www.jibx.org/main-reactor/jibx-run) org.jibx:jibx-run:bundle:1.2.3License: BSD (http://jibx.sourceforge.net/jibx-license.html) Copyright (c) 2003-2010, Dennis M. Sosnoski.All rights reserved.Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of JiBX nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - JavaAssist (http://www.jboss.org/javassist) org.jboss.javassist:com.springsource.javassist:jar:3.9.0.GA:compileLicense: MPL (http://www.mozilla.org/MPL/MPL-1.1.html)
- HAPI-OSGI-Base Module (http://hl7api.sourceforge.net/hapi-osgi-base/) ca.uhn.hapi:hapi-osgi-base:bundle:1.2License: Mozilla Public License 1.1 (http://www.mozilla.org/MPL/MPL-1.1.txt)