Overview
Wheras in 5.0.0 has one global profile managing deployments, in 5.1 there are now more active profiles with a possible relationships/dependecies on other profiles - called a sub-profile.
The main profiles are:
- The root profile - a profile based on the ${jboss.server.name} with the it's sub-profiles:
- bootstrap - representing 'conf/jboss-service.xml'
- deployers - the deployers/ folder
- applications - a hot-deployment profile for the deploy/ and additional user folders
In general, a profile represents a named collection of deployments on a server. Furthermore, it can also apply different behavior to the deployments managed by this profile. E.g. some profiles provide hot-deployment checks and allow remote distribution of deployments over the DeploymentManager (like the "application" profile). A different profile could also provide a farming service to distribute the deployments over a cluster.
The profile.xml
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="urn:jboss:bean-deployer:2.0">
<classloader><inject bean="profile-classloader:0.0.0" /></classloader>
<classloader name="profile-classloader" xmlns="urn:jboss:classloader:1.0" export-all="NON_EMPTY" import-all="true">
<root>${jboss.lib.url}jboss-profileservice-spi.jar</root>
</classloader>
<!--
The profile configuration
This contains required properties:
The uri to jboss-service.xml.
The uri to the deployers folder.
A list of uris to deploy folders. -->
<bean name="BootstrapProfileFactory" class="org.jboss.system.server.profileservice.repository.StaticProfileFactory">
<property name="bootstrapURI">${jboss.server.home.url}conf/jboss-service.xml</property>
<property name="deployersURI">${jboss.server.home.url}deployers</property>
<property name="applicationURIs">
<list elementClass="java.net.URI">
<value>${jboss.server.home.url}deploy</value>
</list>
</property>
<property name="attachmentStoreRoot">${jboss.server.data.dir}/attachments</property>
<property name="profileFactory"><inject bean="ProfileFactory" /></property>
</bean>
<!-- The default profile key -->
<bean name="DefaultProfileKey" class="org.jboss.profileservice.spi.ProfileKey">
<constructor><parameter>${jboss.server.name}</parameter></constructor>
</bean>
<!-- The ProfileService -->
<bean name="ProfileService" class="org.jboss.system.server.profileservice.repository.AbstractProfileService">
<constructor><parameter><inject bean="jboss.kernel:service=KernelController" /></parameter></constructor>
<property name="deployer"><inject bean="ProfileServiceDeployer" /></property>
<property name="defaultProfile"><inject bean="DefaultProfileKey" /></property>
</bean>
<!-- The Bootstrap implementation that loads the Profile from the ProfileService -->
<bean name="ProfileServiceBootstrap" class="org.jboss.system.server.profileservice.ProfileServiceBootstrap">
<property name="profileKey"><inject bean="DefaultProfileKey" /></property>
<property name="mainDeployer"><inject bean="MainDeployer" /></property>
<property name="profileService"><inject bean="ProfileService" /></property>
<property name="mof"><inject bean="ManagedObjectFactory" /></property>
<property name="mgtDeploymentCreator"><inject bean="ManagedDeploymentCreator" /></property>
<property name="bootstrapProfileFactory"><inject bean="BootstrapProfileFactory" /></property>
</bean>
<!-- The profile factory -->
<bean name="ProfileFactory" class="org.jboss.system.server.profileservice.repository.AbstractProfileFactory">
<property name="profileRepository"><inject bean="ProfileRepositoryFactory" /></property>
</bean>
<!-- The profile repository factory -->
<bean name="ProfileRepositoryFactory" class="org.jboss.system.server.profileservice.repository.TypedProfileRepository">
<!-- Accept any DeploymentRepositoryFactory -->
<incallback method="addRepositoryFactory" />
<uncallback method="removeRepositoryFactory" />
</bean>
<!-- The structure modification cache and checker -->
<bean name="StructureModCache" class="org.jboss.deployers.vfs.spi.structure.modified.DefaultStructureCache">
<destroy method="flush"/>
</bean>
<bean name="StructureModificationChecker" class="org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker">
<constructor>
<parameter><inject bean="MainDeployer" /></parameter>
</constructor>
<property name="cache"><inject bean="StructureModCache" /></property>
<property name="filter"><bean class="org.jboss.system.server.profile.basic.XmlIncludeVirtualFileFilter" /></property>
</bean>
<!-- The default deployment repository factory -->
<bean name="DefaultDeploymentRepositoryFactory" class="org.jboss.system.server.profileservice.repository.DefaultDeploymentRepositoryFactory">
<property name="deploymentFilter"><inject bean="DeploymentFilter" /></property>
<property name="checker"><inject bean="StructureModificationChecker" /></property>
</bean>
<!-- The attachment store -->
<bean name="AttachmentStore" class="org.jboss.system.server.profileservice.repository.AbstractAttachmentStore">
<constructor><parameter><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>
<property name="mainDeployer"><inject bean="MainDeployer" /></property>
<property name="serializer"><inject bean="AttachmentsSerializer" /></property>
</bean>
<bean name="AttachmentsSerializer" class="org.jboss.system.server.profileservice.repository.JAXBAttachmentSerializer">
<constructor><parameter><inject bean="BootstrapProfileFactory" property="attachmentStoreRoot" /></parameter></constructor>
</bean>
<bean name="ProfileServiceDeployer" class="org.jboss.system.server.profileservice.repository.MainDeployerAdapter">
<property name="mainDeployer"><inject bean="MainDeployer" /></property>
<property name="attachmentStore"><inject bean="AttachmentStore" /></property>
</bean>
<bean name="ProfileServicePersistenceDeployer" class="org.jboss.system.server.profileservice.persistence.deployer.ProfileServicePersistenceDeployer" />
<!-- A filter for excluding files from the scanner -->
<bean name="DeploymentFilter" class="org.jboss.virtual.plugins.vfs.helpers.ExtensibleFilter">
<!-- Files starting with theses strings are ignored -->
<property name="prefixes">#,%,\,,.,_$</property>
<!-- Files ending with theses strings are ignored -->
<property name="suffixes">#,$,%,~,\,v,.BAK,.bak,.old,.orig,.tmp,.rej,.sh</property>
<!-- Files matching with theses strings are ignored -->
<property name="matches">.make.state,.nse_depinfo,CVS,CVS.admin,RCS,RCSLOG,SCCS,TAGS,core,tags</property>
</bean>
</deployment>
The main beans are:
- BootstrapProfileFactory: A basic configuration for profiles which are loaded during the bootstrap process.
- bootstrapURI - pointing to the jboss-service.xml.
- deployersURI - pointing to the deployers/ folder.
- applicationsURIs - a list of user application folders.
- attachmentStoreRoot - the path where admin edits are stored.
- ProfileService: The entry point service for accessing/administering server profiles.
ProfileServiceBootstrap: The Bootstrap implementation that uses the ProfileService to load the profile deployments.
- ProfileFactory: A factory for creating a profile based on it's meta data.
- ProfileRepositoryFactory: A factory creating a DeploymentRepository for a specific profile implementation.
- AttachmentStore: A attachment repository storing attachment edits.
- StructureModificationChecker: A checker used to track deployment modifications for hot-deployment.
- DeploymentFilter: A filter for excluded deployment pre- and suffixes.
hd-scanner-jboss-beans.xml
The hd-scanner-jboss-beans.xml contains the HDScanner. A scanner which checks for modified deployments which are getting redeployed. This file can be safely removed to disable hot-deployment checks.
profileservice-jboss-beans.xml
The profileservice-jboss-beans.xml contains a set of Plugins for the ProfileService.
The main beans are:
- DeploymentManager: A deployment plugin for ProfileService.,
- ManagementView: A plugin for managing ManagedDeployments and ManagedObjects.
- ProfileServiceProxyFactory: A remoting proxy factory for ProfileService.
profileservice-secured.jar
This .jar contains a secured ejb3 facade for ProfileService. To secure ProfileService it is required to remove the unsecure proxy binding from the ProfileServiceProxyFactory in 'profileservice-jboss-beans.xml' and change it to a local binding. Furthermore the ejb3 bindings would need to be updated to this new binding.
Comments