org.ow2.jonas.versioning.internal
Class VersioningServiceImpl
java.lang.Object
javax.management.NotificationBroadcasterSupport
org.ow2.jonas.lib.reconfig.ReconfigEmitter
org.ow2.jonas.lib.service.AbsServiceImpl
org.ow2.jonas.versioning.internal.VersioningServiceImpl
- All Implemented Interfaces:
- NotificationBroadcaster, NotificationEmitter, Service, VersioningServiceImplMBean, VersioningService, VersioningServiceBase
public class VersioningServiceImpl
- extends AbsServiceImpl
- implements VersioningService, VersioningServiceImplMBean
Implements the versioning service.
- Author:
- Frederic Germaneau, S. Ali Tokmen
- See Also:
VersioningService
| Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl |
convertToList, doInit, getDomainName, getJonasServerName, getName, getServerProperties, init, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString |
VersioningServiceImpl
public VersioningServiceImpl()
setJmxService
public void setJmxService(JmxService jmxService)
- Parameters:
jmxService - JMX service to set.
getObjectName
public static ObjectName getObjectName(String domainName)
- Parameters:
domainName - Server's domain name.
- Returns:
- JMX name of the versioning service management bean.
doStart
protected void doStart()
- Registers the management bean with JMX.
- Specified by:
doStart in class AbsServiceImpl
doStop
protected void doStop()
- Unregisters the management bean from JMX.
- Specified by:
doStop in class AbsServiceImpl
getPolicies
public String[] getPolicies()
- Specified by:
getPolicies in interface VersioningServiceBase
- Returns:
- Possible policies.
isVersioningEnabled
public boolean isVersioningEnabled()
- Specified by:
isVersioningEnabled in interface VersioningServiceBase
- Returns:
- Whether versioning is enabled (started).
getDefaultDeploymentPolicy
public String getDefaultDeploymentPolicy()
- Specified by:
getDefaultDeploymentPolicy in interface VersioningServiceBase
- Returns:
- Default policy, as set via JMX.
setDefaultDeploymentPolicy
public void setDefaultDeploymentPolicy(String defaultPolicy)
- Specified by:
setDefaultDeploymentPolicy in interface VersioningServiceBase
- Parameters:
defaultPolicy - Default deployment policy to set.
getVersionID
public String getVersionID(File file)
- Specified by:
getVersionID in interface VersioningService
- Parameters:
file - JAR, WAR or EAR file to read the version ID from.
- Returns:
- Version ID of file, null if none found.
getVersionID
public String getVersionID(URL url)
- Specified by:
getVersionID in interface VersioningServiceBase
- Parameters:
url - JAR, WAR or EAR file to read the version ID from.
- Returns:
- Version ID of url, null if none found.
getVersionID
public String getVersionID(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
- Specified by:
getVersionID in interface VersioningService
- Parameters:
deployable - JAR, WAR or EAR object to read the version ID from.
- Returns:
- Version ID of deployable, null if none found.
getPrefix
public String getPrefix(File file)
- Specified by:
getPrefix in interface VersioningService
- Parameters:
file - JAR or EAR object to create a JNDI prefix from.
- Returns:
- JNDI prefix for file, null if none found.
getPrefix
public String getPrefix(URL url)
- Specified by:
getPrefix in interface VersioningServiceBase
- Parameters:
url - JAR or EAR object to create a JNDI prefix from.
- Returns:
- JNDI prefix for url, null if none found.
getPrefix
public String getPrefix(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
- Specified by:
getPrefix in interface VersioningService
- Parameters:
deployable - JAR or EAR object to create a JNDI prefix from.
- Returns:
- JNDI prefix for deployable, null if none found.
createJNDIBindingMBeans
public void createJNDIBindingMBeans(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
- Creates JNDI binding management beans for a given archive.
- Specified by:
createJNDIBindingMBeans in interface VersioningService
- Parameters:
deployable - JAR, WAR or EAR object to read the JNDI prefix from.
garbageCollectJNDIBindingMBeans
public void garbageCollectJNDIBindingMBeans()
- Removes JNDI binding management beans that are not in the JNDI directory
anymore.
- Specified by:
garbageCollectJNDIBindingMBeans in interface VersioningService
getBaseName
public String getBaseName(URL url)
- Specified by:
getBaseName in interface VersioningServiceBase
- Parameters:
url - JAR, WAR or EAR object to get the base name for. The base name
is used when creating the JNDI naming prefix.
- Returns:
- Base name for URL, null if none found.
Copyright ? 2009 OW2 Consortium. All Rights Reserved.