org.jboss.hibernate.har
Class HARDeployer

java.lang.Object
  extended byorg.jboss.mx.util.JBossNotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.jboss.deployment.SubDeployerSupport
              extended byorg.jboss.hibernate.har.HARDeployer
All Implemented Interfaces:
HARDeployerMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, org.jboss.system.Service, org.jboss.system.ServiceMBean, org.jboss.deployment.SubDeployer, org.jboss.deployment.SubDeployerMBean

public class HARDeployer
extends org.jboss.deployment.SubDeployerSupport
implements HARDeployerMBean

Deployer for Hibernate har archives. A Hibernate archive is expected to have a .har extension and include:

Version:
$Revision: 1.2.2.4 $
Author:
Alexey Loubyansky, Steve Ebersole, Dimitris Andreadis

Nested Class Summary
 
Nested classes inherited from class org.jboss.deployment.SubDeployerSupport
org.jboss.deployment.SubDeployerSupport.ClassConfiguration
 
Field Summary
 
Fields inherited from class org.jboss.deployment.SubDeployerSupport
CONFIGURATION, mainDeployer, nativePrefix, nativeSuffix, relativeOrder, suffixes, tempDeployDir
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, server, SERVICE_CONTROLLER_SIG, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, REGISTERED, START_EVENT, STARTED, STARTING, states, STOP_EVENT, STOPPED, STOPPING, UNREGISTERED
 
Fields inherited from interface org.jboss.deployment.SubDeployer
CREATE_NOTIFICATION, DESTROY_NOTIFICATION, INIT_NOTIFICATION, RELATIVE_ORDER_100, RELATIVE_ORDER_200, RELATIVE_ORDER_300, RELATIVE_ORDER_400, RELATIVE_ORDER_500, RELATIVE_ORDER_600, RELATIVE_ORDER_700, RELATIVE_ORDER_800, RELATIVE_ORDER_900, START_NOTIFICATION, STOP_NOTIFICATION
 
Constructor Summary
HARDeployer()
          Default CTOR used to set default values to the Suffixes and RelativeOrder attributes.
 
Method Summary
 boolean accepts(org.jboss.deployment.DeploymentInfo di)
          The HARDeployer accepts either archives ending in '.har' or exploded directories (with name ending in '.har/').
 void create(org.jboss.deployment.DeploymentInfo di)
           
protected  void deployUrl(org.jboss.deployment.DeploymentInfo di, URL url, String name)
           
 void destroy(org.jboss.deployment.DeploymentInfo di)
           
 Iterator getDeployedApplications()
          Returns the deployed applications.
protected  javax.management.ObjectName getObjectName(javax.management.MBeanServer server, javax.management.ObjectName name)
           
 boolean getValidateDTDs()
          Get the flag indicating that ejb-jar.dtd, jboss.dtd & jboss-web.dtd conforming documents should be validated against the DTD.
 void init(org.jboss.deployment.DeploymentInfo di)
          Initialize the given deployment.
 boolean isDeployable(String name, URL url)
           
protected  void processNestedDeployments(org.jboss.deployment.DeploymentInfo di)
           
 void setValidateDTDs(boolean validate)
          Set the flag indicating that ejb-jar.dtd, jboss.dtd & jboss-web.dtd conforming documents should be validated against the DTD.
 void start(org.jboss.deployment.DeploymentInfo di)
           
protected  void startService()
          Get a reference to the ServiceController
 void stop(org.jboss.deployment.DeploymentInfo di)
           
protected  void stopService()
          Implements the template method in superclass.
 
Methods inherited from class org.jboss.deployment.SubDeployerSupport
addDeployableFiles, addDeployableJar, createService, destroyService, emitNotification, getRelativeOrder, getSuffixes, setRelativeOrder, setSuffixes
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, destroy, getLog, getName, getNextNotificationSequenceNumber, getServer, getServiceName, getState, getStateString, jbossInternalCreate, jbossInternalDescription, jbossInternalDestroy, jbossInternalLifecycle, jbossInternalStart, jbossInternalStop, postDeregister, postRegister, preDeregister, preRegister, start, stop
 
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.deployment.SubDeployerMBean
getRelativeOrder, getSuffixes, setRelativeOrder, setSuffixes
 
Methods inherited from interface org.jboss.system.ServiceMBean
getName, getState, getStateString, jbossInternalLifecycle
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 
Methods inherited from interface org.jboss.deployment.SubDeployer
getServiceName
 

Constructor Detail

HARDeployer

public HARDeployer()
Default CTOR used to set default values to the Suffixes and RelativeOrder attributes. Those are read at subdeployer registration time by the MainDeployer to alter its SuffixOrder.

Method Detail

getDeployedApplications

public Iterator getDeployedApplications()
Returns the deployed applications.

Specified by:
getDeployedApplications in interface HARDeployerMBean

getObjectName

protected javax.management.ObjectName getObjectName(javax.management.MBeanServer server,
                                                    javax.management.ObjectName name)
                                             throws javax.management.MalformedObjectNameException
Throws:
javax.management.MalformedObjectNameException

startService

protected void startService()
                     throws Exception
Get a reference to the ServiceController

Throws:
Exception

stopService

protected void stopService()
                    throws Exception
Implements the template method in superclass. This method stops all the applications in this server.

Throws:
Exception

getValidateDTDs

public boolean getValidateDTDs()
Get the flag indicating that ejb-jar.dtd, jboss.dtd & jboss-web.dtd conforming documents should be validated against the DTD.

Specified by:
getValidateDTDs in interface HARDeployerMBean

setValidateDTDs

public void setValidateDTDs(boolean validate)
Set the flag indicating that ejb-jar.dtd, jboss.dtd & jboss-web.dtd conforming documents should be validated against the DTD.

Specified by:
setValidateDTDs in interface HARDeployerMBean

processNestedDeployments

protected void processNestedDeployments(org.jboss.deployment.DeploymentInfo di)
                                 throws org.jboss.deployment.DeploymentException
Throws:
org.jboss.deployment.DeploymentException

deployUrl

protected void deployUrl(org.jboss.deployment.DeploymentInfo di,
                         URL url,
                         String name)
                  throws org.jboss.deployment.DeploymentException
Throws:
org.jboss.deployment.DeploymentException

isDeployable

public boolean isDeployable(String name,
                            URL url)

accepts

public boolean accepts(org.jboss.deployment.DeploymentInfo di)
The HARDeployer accepts either archives ending in '.har' or exploded directories (with name ending in '.har/'). Furthermore, the deployment must contain a file named 'META-INF/hibernate-service.xml' in order to be accepted.

Specified by:
accepts in interface org.jboss.deployment.SubDeployerMBean
Parameters:
di - The deployment info for the deployment to be checked for acceptance.
Returns:
True if the conditions mentioned above hold true; false otherwise.

init

public void init(org.jboss.deployment.DeploymentInfo di)
          throws org.jboss.deployment.DeploymentException
Initialize the given deployment. Overriden to perform custom watch logic.

Specified by:
init in interface org.jboss.deployment.SubDeployerMBean
Parameters:
di - The deployment to be initialized.
Throws:
org.jboss.deployment.DeploymentException

create

public void create(org.jboss.deployment.DeploymentInfo di)
            throws org.jboss.deployment.DeploymentException
Specified by:
create in interface org.jboss.deployment.SubDeployerMBean
Throws:
org.jboss.deployment.DeploymentException

start

public void start(org.jboss.deployment.DeploymentInfo di)
           throws org.jboss.deployment.DeploymentException
Specified by:
start in interface org.jboss.deployment.SubDeployerMBean
Throws:
org.jboss.deployment.DeploymentException

stop

public void stop(org.jboss.deployment.DeploymentInfo di)
          throws org.jboss.deployment.DeploymentException
Specified by:
stop in interface org.jboss.deployment.SubDeployerMBean
Throws:
org.jboss.deployment.DeploymentException

destroy

public void destroy(org.jboss.deployment.DeploymentInfo di)
             throws org.jboss.deployment.DeploymentException
Specified by:
destroy in interface org.jboss.deployment.SubDeployerMBean
Throws:
org.jboss.deployment.DeploymentException


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.