|
JBoss API: Class J2eeDeployer
org.jboss.deployment
|
Field Summary | |
static java.lang.String |
CONFIG
|
java.io.File |
DEPLOYMENT_DIR
|
static int |
EASY
|
protected InstallerFactory |
installer
The InstallerFactory which installs J2EE module deployments |
protected javax.management.ObjectName |
jarDeployer
The name of the EJB jar deployer |
protected java.lang.String |
name
|
static int |
RESTRICTIVE
|
protected javax.management.MBeanServer |
server
|
protected javax.management.ObjectName |
warDeployer
The name of the Web war deployer |
Fields inherited from class org.jboss.util.ServiceMBeanSupport |
log |
Fields inherited from interface org.jboss.deployment.J2eeDeployerMBean |
OBJECT_NAME |
Fields inherited from interface org.jboss.util.ServiceMBean |
STARTED, STARTING, states, STOPPED, STOPPING |
Constructor Summary | |
J2eeDeployer()
|
|
J2eeDeployer(java.lang.String _name,
java.lang.String jarDeployerName,
java.lang.String warDeployerName)
|
Method Summary | |
protected javax.management.ObjectName |
createCollectorName()
creation of collector name factored out. |
protected void |
createContextClassLoader(Deployment deployment)
creates an application class loader for this deployment this class loader will be shared between jboss and tomcat via the contextclassloader. |
void |
deploy(java.lang.String _url)
Deploys the given URL independent if it is a EJB.jar, Web.war or Application.ear. |
java.io.FilenameFilter |
getDeployableFilter()
Provides a filter that decides whether a file can be deployed by this deployer based on the filename. |
java.lang.String |
getDeployerName()
|
java.lang.String |
getJarDeployerName()
|
java.lang.String |
getName()
|
protected javax.management.ObjectName |
getObjectName(javax.management.MBeanServer server,
javax.management.ObjectName name)
|
java.lang.String |
getWarDeployerName()
|
protected void |
initService()
|
protected Deployment |
installApplication(java.net.URL _downloadUrl)
determines deployment type and installs (downloads) all packages needed by the given deployment of the given deployment. |
boolean |
isDeployed(java.lang.String _url)
Checks if the given URL is currently deployed or not. |
static void |
main(java.lang.String[] _args)
only for testing... |
protected void |
removeFromCollector(java.lang.String _url,
javax.management.ObjectName lCollector)
report of removal to data collector factored out for subclass access a try/catch for dealing with an uninstalled collector has been added. |
void |
setDeployerName(java.lang.String name)
|
void |
setJarDeployerName(java.lang.String jarDeployerName)
|
void |
setWarDeployerName(java.lang.String warDeployerName)
|
protected void |
startApplication(Deployment _d)
Starts the successful downloaded deployment. |
protected void |
startModules(Deployment _d,
java.lang.ClassLoader appCl,
java.lang.ClassLoader oldCl)
factored out method to start individual modules and reinstall context classloader afterwards |
protected void |
startService()
|
protected void |
stopApplication(Deployment _d)
Stops a running deployment. |
protected void |
stopService()
undeploys all deployments |
void |
undeploy(java.lang.String _app)
Undeploys the given URL (if it is deployed). |
protected void |
uninstallApplication(Deployment _d)
|
protected void |
uninstallApplication(java.lang.String _pattern)
Deletes the file tree of the specified application. |
protected boolean |
warDeployerAvailable()
tests if the web container deployer is available |
Methods inherited from class org.jboss.util.ServiceMBeanSupport |
destroy, destroyService, getServer, getState, getStateString, init, nextSequenceNumber, postDeregister, postRegister, preDeregister, preRegister, start, stop |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
addNotificationListener, getNotificationInfo, 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.util.ServiceMBean |
getState, getStateString |
Methods inherited from interface org.jboss.util.Service |
destroy, init, start, stop |
Field Detail |
public java.io.File DEPLOYMENT_DIR
public static java.lang.String CONFIG
public static final int EASY
public static final int RESTRICTIVE
protected javax.management.MBeanServer server
protected java.lang.String name
protected javax.management.ObjectName jarDeployer
protected javax.management.ObjectName warDeployer
protected InstallerFactory installer
Constructor Detail |
public J2eeDeployer()
public J2eeDeployer(java.lang.String _name, java.lang.String jarDeployerName, java.lang.String warDeployerName)
Method Detail |
public static void main(java.lang.String[] _args) throws java.lang.Exception
public void setDeployerName(java.lang.String name)
setDeployerName
in interface J2eeDeployerMBean
public java.lang.String getDeployerName()
getDeployerName
in interface J2eeDeployerMBean
public void setJarDeployerName(java.lang.String jarDeployerName)
setJarDeployerName
in interface J2eeDeployerMBean
public java.lang.String getJarDeployerName()
getJarDeployerName
in interface J2eeDeployerMBean
public void setWarDeployerName(java.lang.String warDeployerName)
setWarDeployerName
in interface J2eeDeployerMBean
public java.lang.String getWarDeployerName()
getWarDeployerName
in interface J2eeDeployerMBean
public java.io.FilenameFilter getDeployableFilter()
DeployerMBean
AutoDeployer
service.getDeployableFilter
in interface DeployerMBean
org.jboss.deployment.DeployerMBean
FilenameFilter
that only
accept
s files with names that can be
deployed by this deployerpublic void deploy(java.lang.String _url) throws java.net.MalformedURLException, java.io.IOException, J2eeDeploymentException
deploy
in interface DeployerMBean
_url
- the url (file or http) to the archiv to deployjava.net.MalformedURLException
- in case of a malformed urlJ2eeDeploymentException
- if something went wrong...java.io.IOException
- if trouble while file download occursprotected javax.management.ObjectName createCollectorName()
protected void removeFromCollector(java.lang.String _url, javax.management.ObjectName lCollector)
public void undeploy(java.lang.String _app) throws java.io.IOException, J2eeDeploymentException
undeploy
in interface DeployerMBean
_url
- the url to to undeployjava.net.MalformedURLException
- in case of a malformed urlJ2eeDeploymentException
- if something went wrong (but should have removed all files)java.io.IOException
- if file removement failspublic boolean isDeployed(java.lang.String _url) throws java.net.MalformedURLException, J2eeDeploymentException
isDeployed
in interface DeployerMBean
_url
- the url to to checkjava.net.MalformedURLException
- in case of a malformed urlJ2eeDeploymentException
- if the app seems to be deployed, but some of its modules
are not.public java.lang.String getName()
getName
in interface ServiceMBean
getName
in class ServiceMBeanSupport
protected javax.management.ObjectName getObjectName(javax.management.MBeanServer server, javax.management.ObjectName name) throws javax.management.MalformedObjectNameException
getObjectName
in class ServiceMBeanSupport
protected void initService() throws java.lang.Exception
initService
in class ServiceMBeanSupport
protected void startService() throws java.lang.Exception
startService
in class ServiceMBeanSupport
protected void stopService()
stopService
in class ServiceMBeanSupport
protected Deployment installApplication(java.net.URL _downloadUrl) throws java.io.IOException, J2eeDeploymentException
_downloadUrl
- the url that points to the app to installjava.io.IOException
- if the download failsJ2eeDeploymentException
- if the given package is somehow inconsistentprotected void uninstallApplication(java.lang.String _pattern) throws java.io.IOException
_name
- the directory (DEPLOYMENT_DIR/<_name> to remove recursivlyjava.io.IOException
- if something goes wrongprotected void uninstallApplication(Deployment _d) throws java.io.IOException
protected void startApplication(Deployment _d) throws J2eeDeploymentException
_d
- the deployment to startJ2eeDeploymentException
- if an error occures for one of these
modulesprotected void startModules(Deployment _d, java.lang.ClassLoader appCl, java.lang.ClassLoader oldCl) throws J2eeDeploymentException
protected void stopApplication(Deployment _d) throws J2eeDeploymentException
_d
- the deployment to stopJ2eeDeploymentException
- if an error occures for one of these
modulesprotected boolean warDeployerAvailable()
protected void createContextClassLoader(Deployment deployment) throws J2eeDeploymentException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |