|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.mx.util.JBossNotificationBroadcasterSupport
org.jboss.system.ServiceMBeanSupport
org.jboss.system.ListenerServiceMBeanSupport
org.jboss.services.deployment.DeploymentService
public class DeploymentService
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.jboss.system.ListenerServiceMBeanSupport |
---|
ListenerServiceMBeanSupport.SubscriptionInfo |
Field Summary | |
---|---|
static String |
DEFAULT_DEPLOY_DIR
where modules are moved for hot deployment |
static String |
DEFAULT_TEMPLATE_DIR
where to look for templates |
static String |
DEFAULT_UNDEPLOY_DIR
where modules are created/removed |
Fields inherited from class org.jboss.system.ServiceMBeanSupport |
---|
log, server, SERVICE_CONTROLLER_SIG, serviceName |
Fields inherited from interface org.jboss.system.ListenerServiceMBean |
---|
SL_FILTER_ELEMENT, SL_FILTER_FACTORY_ATTRIBUTE, SL_MBEAN_ELEMENT, SL_MBEAN_HANDBACK_ATTRIBUTE, SL_MBEAN_NAME_ATTRIBUTE, SL_NOTIFICATION_ELEMENT, SL_NOTIFICATION_TYPE_ATTRIBUTE, SL_ROOT_ELEMENT |
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 |
Constructor Summary | |
---|---|
DeploymentService()
CTOR |
Method Summary | |
---|---|
String |
createModule(String module,
String template,
HashMap properties)
Generate a new module based on the specified template and the input properties |
String |
createModule(String module,
String template,
String[] properties)
Used primarily for testing through the jmx-console |
void |
deployModuleAsynch(String module)
Move a module to the deploy directory |
String |
getDeployDir()
Gets the directory where modules should be deployed |
URL |
getDeployedURL(String module)
Get the URL of a deployed module |
String |
getTemplateDir()
Gets the directory where templates are stored |
List |
getTemplatePropertyInfo(String template)
Get property metadata information for a particular template List |
String |
getUndeployDir()
Gets the directory where new deployments are produced |
URL |
getUndeployedURL(String module)
Get the URL of an undeployed module |
Set |
listModuleTemplates()
Return the set of available deployment templates Set |
String |
removeDataSource(String module,
String template,
HashMap properties)
Remove an existing data source based on the specified template and the input properties. |
boolean |
removeModule(String module)
Remove a module if exists |
void |
setDeployDir(String deployDir)
Sets the directory where modules should be deployed |
void |
setTemplateDir(String templateDir)
Sets the directory where templates are stored |
void |
setUndeployDir(String undeployDir)
Sets the directory where new deployments are produced |
void |
startService()
|
void |
stopService()
|
void |
undeployModuleAsynch(String module)
Move a module to the undeploy directory |
String |
updateDataSource(String module,
String template,
HashMap properties)
Update an existing data source based on the specified template and the input properties. |
boolean |
updateMBean(MBeanData data)
Update an existing module based on the specified template and the input properties |
boolean |
uploadLibrary(URL src,
String filename)
Upload a new library to server lib dir. |
Methods inherited from class org.jboss.system.ListenerServiceMBeanSupport |
---|
getSubscriptions, handleNotification, handleNotification2, setSubscriptionList, setSubscriptions, subscribe, subscribe, subscribe, unsubscribe |
Methods inherited from class org.jboss.mx.util.JBossNotificationBroadcasterSupport |
---|
addNotificationListener, getNotificationInfo, handleNotification, nextNotificationSequenceNumber, 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.system.ListenerServiceMBean |
---|
setSubscriptionList |
Methods inherited from interface org.jboss.system.ServiceMBean |
---|
getName, getState, getStateString, jbossInternalLifecycle |
Methods inherited from interface org.jboss.system.Service |
---|
create, destroy, start, stop |
Field Detail |
---|
public static final String DEFAULT_TEMPLATE_DIR
public static final String DEFAULT_UNDEPLOY_DIR
public static final String DEFAULT_DEPLOY_DIR
Constructor Detail |
---|
public DeploymentService()
Method Detail |
---|
public void setTemplateDir(String templateDir)
DeploymentServiceMBean
setTemplateDir
in interface DeploymentServiceMBean
templateDir
- The templateDir to set.public String getTemplateDir()
DeploymentServiceMBean
getTemplateDir
in interface DeploymentServiceMBean
public String getUndeployDir()
DeploymentServiceMBean
getUndeployDir
in interface DeploymentServiceMBean
public void setUndeployDir(String undeployDir)
DeploymentServiceMBean
setUndeployDir
in interface DeploymentServiceMBean
public String getDeployDir()
DeploymentServiceMBean
getDeployDir
in interface DeploymentServiceMBean
public void setDeployDir(String deployDir)
DeploymentServiceMBean
setDeployDir
in interface DeploymentServiceMBean
public Set listModuleTemplates()
DeploymentServiceMBean
listModuleTemplates
in interface DeploymentServiceMBean
public List getTemplatePropertyInfo(String template) throws Exception
DeploymentServiceMBean
getTemplatePropertyInfo
in interface DeploymentServiceMBean
Exception
public String createModule(String module, String template, HashMap properties) throws Exception
DeploymentServiceMBean
createModule
in interface DeploymentServiceMBean
Exception
public String createModule(String module, String template, String[] properties) throws Exception
createModule
in interface DeploymentServiceMBean
Exception
public boolean removeModule(String module)
DeploymentServiceMBean
removeModule
in interface DeploymentServiceMBean
public boolean updateMBean(MBeanData data) throws Exception
DeploymentServiceMBean
updateMBean
in interface DeploymentServiceMBean
data
- Data used to update the mbean descriptor. The name and
templateName properties are required.
Exception
public String updateDataSource(String module, String template, HashMap properties) throws Exception
DeploymentServiceMBean
Before updating a data source, you will need to gather the properties for the existing data source. The properties can be found in the following MBeans (where XXX is the data source jndi name, and YYY corresponds to the transaction type: NoTxCM, LocalTxCM, XATxCM):
To find the dependencies, get the jboss.system:service=ServiceController MBean and invoke the listDeployed method. Then search through the returned results for the jboss.jca:name=XXX,service=ManagedConnectionFactory MBean. That entry will contain the dependecies. Note that there will be an extra implied dependency named "jboss.jca:service=RARDeployment,name='jboss-ZZZ-jdbc.rar'", where ZZZ is 'local' (local and no transaction types) or 'xa'. Ignore this extra dependency, do not provide it when doing an update.
updateDataSource
in interface DeploymentServiceMBean
module
- The name of the model that contains the data source definition.
For example, the default data source, DefaultDS, is typically found in a
module named "hsqldb-ds.xml", with "hsqldb" being an acceptable abbreviation.template
- The name of the template to use to update the data source.
You must select the proper template based on the data source transaction type.
Use one of the following: "local-tx-datasource", "no-tx-datasource", or
"xa-datasource". Alternatively, you could add the "-update" suffix; for
example, "local-tx-datasource-update" is the same as "local-tx-datasource".
Exception
public String removeDataSource(String module, String template, HashMap properties) throws Exception
DeploymentServiceMBean
removeDataSource
in interface DeploymentServiceMBean
module
- The name of the model that contains the data source definition.
See the module parameter under updateDataSource for more information.template
- There is only one delete template: "datasource". Optionally,
you can use the template name "datasource-remove".properties
- The key property to provide is "jndi-name". This property
if used to determine which data source to remove.
Exception
DeploymentServiceMBean.updateDataSource(String, String, HashMap)
public void deployModuleAsynch(String module) throws Exception
DeploymentServiceMBean
deployModuleAsynch
in interface DeploymentServiceMBean
Exception
public URL getDeployedURL(String module) throws Exception
DeploymentServiceMBean
getDeployedURL
in interface DeploymentServiceMBean
Exception
public void undeployModuleAsynch(String module) throws Exception
DeploymentServiceMBean
undeployModuleAsynch
in interface DeploymentServiceMBean
Exception
public URL getUndeployedURL(String module) throws Exception
DeploymentServiceMBean
getUndeployedURL
in interface DeploymentServiceMBean
Exception
public boolean uploadLibrary(URL src, String filename)
uploadLibrary
in interface DeploymentServiceMBean
src
- the source url to copyfilename
- the filename to use when copying (optional)
public void startService() throws Exception
startService
in class ServiceMBeanSupport
Exception
public void stopService()
stopService
in class ServiceMBeanSupport
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |