org.ow2.jonas.ejb.easybeans
Class EasyBeansDeployer

java.lang.Object
  extended by org.ow2.jonas.ejb.easybeans.EasyBeansDeployer
All Implemented Interfaces:
org.ow2.util.ee.deploy.api.deployer.IDeployer

public class EasyBeansDeployer
extends Object
implements org.ow2.util.ee.deploy.api.deployer.IDeployer

This deployer will deploy EJB3 on EasyBeans.

Author:
Florent BENOIT Contributors: S. Ali Tokmen (versioning)

Constructor Summary
EasyBeansDeployer()
          Build a new instance of the EasyBeans deployer.
 
Method Summary
 void deploy(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
          Deploy a deployable.
protected  void deployEJB3(org.ow2.util.ee.deploy.api.deployable.EJB3Deployable ejb3Deployable)
          Deploy the given deployable.
 Map<URL,org.ow2.util.ee.deploy.api.deployable.EJB3Deployable> getEJB3s()
          Returns a Map containing all deployed EJB3s.
 org.ow2.jonas.properties.ServerProperties getServerProperties()
          Returns the server properties.
 org.ow2.jonas.versioning.VersioningService getVersioningService()
           
 boolean isDeployed(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
          Checks if the given deployable is deployed or not.
 void setAppsClassLoader(ClassLoader appsClassLoader)
          Sets the classloader to use for all deployed applications.
 void setDeployerLog(org.ow2.jonas.lib.work.DeployerLog deployerLog)
          Set the DeployerLog of the EasyBeansDeployer.
 void setEmbedded(org.ow2.easybeans.server.Embedded easybeansServer)
          Sets the EasyBeans embedded instance.
 void setServerProperties(org.ow2.jonas.properties.ServerProperties serverProperties)
          Set the server properties.
 void setVersioningService(org.ow2.jonas.versioning.VersioningService versioningService)
           
 boolean supports(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
          Checks if the given deployable is supported by the Deployer.
 void undeploy(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
          Undeploy the given deployable.
protected  void undeployEJB3(org.ow2.util.ee.deploy.api.deployable.EJB3Deployable ejb3Deployable)
          Undeploy the given EJB3.
 void unsetVersioningService()
          Sets the versioning service to null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EasyBeansDeployer

public EasyBeansDeployer()
Build a new instance of the EasyBeans deployer.

Method Detail

deploy

public void deploy(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
            throws org.ow2.util.ee.deploy.api.deployer.DeployerException
Deploy a deployable. It can be an EJB jar, EAR, WAR, etc.

Specified by:
deploy in interface org.ow2.util.ee.deploy.api.deployer.IDeployer
Parameters:
deployable - a given deployable
Throws:
org.ow2.util.ee.deploy.api.deployer.DeployerException - if the deployment is not done.

deployEJB3

protected void deployEJB3(org.ow2.util.ee.deploy.api.deployable.EJB3Deployable ejb3Deployable)
                   throws org.ow2.util.ee.deploy.api.deployer.DeployerException
Deploy the given deployable.

Parameters:
ejb3Deployable - the EJB3 deployable.
Throws:
org.ow2.util.ee.deploy.api.deployer.DeployerException - if the EJB3 is not deployed.

undeployEJB3

protected void undeployEJB3(org.ow2.util.ee.deploy.api.deployable.EJB3Deployable ejb3Deployable)
                     throws org.ow2.util.ee.deploy.api.deployer.DeployerException
Undeploy the given EJB3.

Parameters:
ejb3Deployable - the deployable to remove.
Throws:
org.ow2.util.ee.deploy.api.deployer.DeployerException - if the EJB3 is not deployed.

undeploy

public void undeploy(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
              throws org.ow2.util.ee.deploy.api.deployer.DeployerException
Undeploy the given deployable. It can be an EJB jar, EAR, WAR, etc.

Specified by:
undeploy in interface org.ow2.util.ee.deploy.api.deployer.IDeployer
Parameters:
deployable - a given deployable to undeploy
Throws:
org.ow2.util.ee.deploy.api.deployer.DeployerException - if the undeploy operation fails.

isDeployed

public boolean isDeployed(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
                   throws org.ow2.util.ee.deploy.api.deployer.DeployerException
Checks if the given deployable is deployed or not.

Specified by:
isDeployed in interface org.ow2.util.ee.deploy.api.deployer.IDeployer
Parameters:
deployable - test if a given deployable is already deployed.
Returns:
true if the deployable is deployed.
Throws:
org.ow2.util.ee.deploy.api.deployer.DeployerException - if the undeploy operation fails.

supports

public boolean supports(org.ow2.util.ee.deploy.api.deployable.IDeployable<?> deployable)
Checks if the given deployable is supported by the Deployer.

Specified by:
supports in interface org.ow2.util.ee.deploy.api.deployer.IDeployer
Parameters:
deployable - the deployable to be checked
Returns:
true if it is supported, else false.

getEJB3s

public Map<URL,org.ow2.util.ee.deploy.api.deployable.EJB3Deployable> getEJB3s()
Returns a Map containing all deployed EJB3s.

Returns:
a Map containing all deployed EJB3s.

setEmbedded

public void setEmbedded(org.ow2.easybeans.server.Embedded easybeansServer)
Sets the EasyBeans embedded instance.

Parameters:
easybeansServer - the EasyBeans instance.

getServerProperties

public org.ow2.jonas.properties.ServerProperties getServerProperties()
Returns the server properties.

Returns:
the server properties

setServerProperties

public void setServerProperties(org.ow2.jonas.properties.ServerProperties serverProperties)
Set the server properties.

Parameters:
serverProperties - the given server properties

setVersioningService

public void setVersioningService(org.ow2.jonas.versioning.VersioningService versioningService)
Parameters:
versioningService - The versioning service to set.

unsetVersioningService

public void unsetVersioningService()
Sets the versioning service to null.


getVersioningService

public org.ow2.jonas.versioning.VersioningService getVersioningService()
Returns:
The versioning service.

setDeployerLog

public void setDeployerLog(org.ow2.jonas.lib.work.DeployerLog deployerLog)
Set the DeployerLog of the EasyBeansDeployer.

Parameters:
deployerLog - the DeployerLog to use

setAppsClassLoader

public void setAppsClassLoader(ClassLoader appsClassLoader)
Sets the classloader to use for all deployed applications.

Parameters:
appsClassLoader - the given classloader.


Copyright © 2009 OW2 Consortium. All Rights Reserved.