User: d_jencks
Date: 02/02/23 07:13:43
Modified: jboss.net/src/main/org/jboss/net/axis/server
AxisService.java Constants.java
Log:
updated to new sub deployer structure and made war deployment go through main
deployer
Revision Changes Path
1.10 +76 -50
contrib/jboss.net/src/main/org/jboss/net/axis/server/AxisService.java
Index: AxisService.java
===================================================================
RCS file:
/cvsroot/jboss/contrib/jboss.net/src/main/org/jboss/net/axis/server/AxisService.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- AxisService.java 15 Feb 2002 03:25:29 -0000 1.9
+++ AxisService.java 23 Feb 2002 15:13:43 -0000 1.10
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: AxisService.java,v 1.9 2002/02/15 03:25:29 user57 Exp $
+// $Id: AxisService.java,v 1.10 2002/02/23 15:13:43 d_jencks Exp $
package org.jboss.net.axis.server;
@@ -67,7 +67,7 @@
* A deployer service that installs and manages Axis within JMX.
* @created 27. September 2001
* @author <a href="mailto:[EMAIL PROTECTED]">Christoph G. Jung</a>
- * @version $Revision: 1.9 $
+ * @version $Revision: 1.10 $
* Change notes:
* <ul>
* <li> 01.02.02: CGJ, Adapted to jboss3.0.0DR1 deployment changes. Arrgh! <li>
@@ -247,15 +247,10 @@
// Call the war deployer through the JMX server to initialise
// and deploy the info
- getServer().invoke(new ObjectName(getWarDeployerName()),
- INIT_METHOD_NAME, new Object[]
- {myDeploymentInfo},new String[]
- {DEPLOYMENT_INFO_CLASS_NAME});
-
- getServer().invoke(new ObjectName(getWarDeployerName()),
- DEPLOY_METHOD_NAME, new Object[]
- {myDeploymentInfo},new String[]
- {DEPLOYMENT_INFO_CLASS_NAME});
+ server.invoke(MainDeployerMBean.OBJECT_NAME,
+ "deploy",
+ new Object[] {myDeploymentInfo},
+ new String[] {"org.jboss.deployment.DeploymentInfo"});
try
{
@@ -274,6 +269,25 @@
/** what to do to stop axis temporarily --> undeploy the servlet */
public void stopService() throws Exception
{
+ // tear down all running web services
+ //Is this really what you want to do? Not leave services running anyway?
+ for (Iterator apps = new
java.util.ArrayList(deployments.values()).iterator(); apps.hasNext(); )
+ {
+ DeploymentInfo info= (DeploymentInfo) apps.next();
+ try
+ {
+ //unregister through server so it's bookeeping is up to date.
+ server.invoke(MainDeployerMBean.OBJECT_NAME,
+ "undeploy",
+ new Object[] {info},
+ new String[] {"org.jboss.deployment.DeploymentInfo"});
+ }
+ catch(Exception e)
+ {
+ log.error("Could not undeploy deployment "+info,e);
+ }
+ }
+
// deregister from main deployer such that we do not get
// web services assigned anymore
try
@@ -285,17 +299,9 @@
new Object[] {this},
new String[] {"org.jboss.deployment.DeployerMBean"});
}
- catch (Exception e) {log.error("Could not deregister from MainDeployer", e);}
-
- // tear down all running web services
- for (Iterator apps = new
java.util.ArrayList(deployments.values()).iterator(); apps.hasNext(); )
+ catch (Exception e)
{
- DeploymentInfo info= (DeploymentInfo) apps.next();
- try{
- undeploy(info);
- } catch(DeploymentException e) {
- log.error("Could not undeploy deployment "+info,e);
- }
+ log.error("Could not deregister from MainDeployer", e);
}
// undeploy Axis servlet
@@ -305,12 +311,11 @@
log.getCategory().l7dlog(Priority.INFO,ABOUT_TO_UNDEPLOY_0,new Object[]
{myDeploymentInfo},null);
- // Call the appropriate deployer through the JMX server
- Object webApplication=
- getServer().invoke(new ObjectName(getWarDeployerName()),
- UNDEPLOY_METHOD_NAME, new Object[]
- {myDeploymentInfo},new String[]
- {DEPLOYMENT_INFO_CLASS_NAME});
+ server.invoke(MainDeployerMBean.OBJECT_NAME,
+ "undeploy",
+ new Object[] {myDeploymentInfo},
+ new String[] {"org.jboss.deployment.DeploymentInfo"});
+
} catch (Exception e)
{
log.getCategory().error(COULD_NOT_STOP_AXIS, e);
@@ -464,26 +469,45 @@
}
}
+
/**
- * Deploy a given URL.
+ * Describe <code>create</code> method here.
*
- * @param url The URL to deploy.
+ * This step should include deployment steps that expose the existence of the
unit being
+ * deployed to other units.
*
- * @throws MalformedURLException Invalid URL
- * @throws IOException Failed to fetch content
- * @throws DeploymentException Failed to deploy
+ * @param sdi a <code>DeploymentInfo</code> value
+ * @exception DeploymentException if an error occurs
*/
- public void deploy(DeploymentInfo sdi)
- throws DeploymentException {
- log.getCategory().l7dlog(Priority.INFO,ABOUT_TO_DEPLOY_AXIS_0,new Object[]
- {sdi},null);
+ public void create(DeploymentInfo sdi)
+ throws DeploymentException
+ {
+ log.getCategory().l7dlog(Priority.INFO,ABOUT_TO_CREATE_AXIS_0,new Object[]
+ {sdi},null);
if(deployments.containsKey(sdi.url)) {
- undeploy((DeploymentInfo) deployments.get(sdi.url));
+ throw new DeploymentException("attempting to redeploy a depoyed module! " +
sdi.url);
} else {
deployments.put(sdi.url,sdi);
}
+ }
+
+ /**
+ * Describe <code>start</code> method here.
+ *
+ * This should only include deployment activities that refer to resources
+ * outside the unit being deployed.
+ *
+ * @param sdi a <code>DeploymentInfo</code> value
+ * @exception DeploymentException if an error occurs
+ */
+ public void start(DeploymentInfo sdi)
+ throws DeploymentException
+ {
+ log.getCategory().l7dlog(Priority.INFO,ABOUT_TO_START_AXIS_0,new Object[]
+ {sdi},null);
+
// remember old classloader
ClassLoader previous=Thread.currentThread().getContextClassLoader();
@@ -562,18 +586,14 @@
}
}
- /**
- * Undeploy a given URL.
- *
- * @param url The URL to undeploy.
- *
- * @throws MalformedURLException Invalid URL
- * @throws IOException Failed to fetch content
- * @throws DeploymentException Failed to undeploy
- */
- public void undeploy(DeploymentInfo sdi)
- throws DeploymentException {
- if(deployments.containsKey(sdi.url)) {
+ public void stop(DeploymentInfo sdi)
+ throws DeploymentException
+ {
+ log.getCategory().l7dlog(Priority.INFO,ABOUT_TO_STOP_AXIS_0,new Object[]
+ {sdi},null);
+ if(!deployments.containsKey(sdi.url)) {
+ throw new DeploymentException("Attempting to undeploy a not-deployed unit!
" + sdi.url);
+ }
// we create a new message context
MessageContext msgContext = new MessageContext((AxisServer)
axisServerMap.get(getRootContext()));
// this was the deployment command
@@ -607,7 +627,13 @@
{
throw new DeploymentException(COULD_NOT_UNDEPLOY,e);
}
- }
+ }
+
+ public void destroy(DeploymentInfo sdi)
+ throws DeploymentException
+ {
+ log.getCategory().l7dlog(Priority.INFO,ABOUT_TO_DESTROY_AXIS_0,new Object[]
+ {sdi},null);
}
//
1.7 +7 -4
contrib/jboss.net/src/main/org/jboss/net/axis/server/Constants.java
Index: Constants.java
===================================================================
RCS file:
/cvsroot/jboss/contrib/jboss.net/src/main/org/jboss/net/axis/server/Constants.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Constants.java 7 Feb 2002 09:49:32 -0000 1.6
+++ Constants.java 23 Feb 2002 15:13:43 -0000 1.7
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: Constants.java,v 1.6 2002/02/07 09:49:32 cgjung Exp $
+// $Id: Constants.java,v 1.7 2002/02/23 15:13:43 d_jencks Exp $
package org.jboss.net.axis.server;
@@ -13,7 +13,7 @@
* Some Constants for the axis package
* @author <a href="mailto:[EMAIL PROTECTED]">Christoph G. Jung</a>
* @created 28. September 2001
- * @version $Revision: 1.6 $
+ * @version $Revision: 1.7 $
*/
public interface Constants extends org.jboss.net.Constants {
@@ -44,7 +44,10 @@
static final String SET_WAR_DEPLOYER_0="Seting WarDeployerName to {0}.";
static final String SET_ROOT_CONTEXT_0="Seting RootContext to {0}.";
static final String SET_SECURITY_DOMAIN_TO_0="Setting Security Domain to {0}.";
- static final String ABOUT_TO_DEPLOY_AXIS_0="About to deploy axis descriptor
{0}.";
+ static final String ABOUT_TO_CREATE_AXIS_0="About to deploy axis descriptor
{0}, create step.";
+ static final String ABOUT_TO_START_AXIS_0="About to deploy axis descriptor {0},
start step.";
+ static final String ABOUT_TO_STOP_AXIS_0="About to undeploy axis descriptor
{0}, stop step.";
+ static final String ABOUT_TO_DESTROY_AXIS_0="About to undeploy axis descriptor
{0}, destroy step.";
static final String COULD_NOT_DEPLOY_DESCRIPTOR="Could not deploy axis
descriptor.";
static final String COULD_NOT_FIND_AXIS_CONFIGURATION_0="Could not find the
axis configuration file {0}.";
static final String NO_VALID_WEB_SERVICE_DESCRIPTOR="Could not find a valid web
service descriptor.";
@@ -56,4 +59,4 @@
static final String EJB_REF_MUST_HAVE_UNIQUE_NAME="An ejb-ref element must have
a unique ejb-ref-name element.";
static final String EJB_REF_MUST_HAVE_UNIQUE_LINK="An ejb-ref element must have
a unique ejb-link element.";
-}
\ No newline at end of file
+}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development