org.backsource.axis
Class DeployerServiceJMX

java.lang.Object
  extended byjavax.management.NotificationBroadcasterSupport
      extended byorg.jboss.system.ServiceMBeanSupport
          extended byorg.backsource.jmx.ServiceMBeanSupport
              extended byorg.backsource.axis.DeployerServiceJMX
All Implemented Interfaces:
org.backsource.axis.DeployerServiceJMXMBean, javax.management.MBeanRegistration, javax.management.NotificationBroadcaster, org.jboss.system.Service, org.backsource.jmx.ServiceMBean, org.jboss.system.ServiceMBean

public class DeployerServiceJMX
extends org.backsource.jmx.ServiceMBeanSupport
implements org.backsource.axis.DeployerServiceJMXMBean

MBean wich deployes and undeployes webservices, at starts and stop.

Here is an example mbean setup:

<server>
   <mbean code="org.backsource.axis.DeployerServiceJMX" name="axis:service=Deployer,name=VV">
    <attribute name="Port">8080</attribute>
    <attribute name="ServletPath">axistest/services/AdminService</attribute>
    <attribute name="Wsdd"><deployment
        name="JMX.net.test"
        targetNameSpace="http://net.jboss.org/jmx/test"
        xmlns="http://xml.apache.org/axis/wsdd/"
        xmlns:jmx="http://net.jboss.org/jmx/test"
        xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
        <service name="DeliverEvents" provider="Handler">
          <parameter name="handlerClass" value="org.backsource.axis.MBeanProxyProvider"/>
          <parameter name="ObjectName" value="ProtocolHandler:handlerName=vvWs"/>
          <parameter name="InterfaceName" value="org.backsource.amsterdam.plugins.axis.AxisEntrance"/>
          <parameter name="allowedMethods" value="handleMessage"/>
          <operation name="handleMessage" qname="tt:DeliverEvents" returnQName="DeliverEventsReturn" xmlns:tt="http://localhost:8080/axistest">
            <parameter name="events" qname="Events" type="xsd:base64Binary"/>
          </operation>
          <requestFlow>
            <handler type="java:org.backsource.axis.UserPasswordAutenticationHandler">
              <parameter name="allowedUser" value="VV"/>
              <parameter name="allowedPassword" value="VV1"/>
            </handler>
          </requestFlow>
        </service>
      </deployment>

    </attribute>
<!-- When embedding axis undeployment is not needed-->
    <attribute name="WsddUndep"><undeployment name="JMX.net.test" xmlns="http://xml.apache.org/axis/wsdd/">
        <service name="DeliverEvents"/>
      </undeployment>
    </attribute>

  </mbean>
</server>

Version:
$Revision: 1.1.1.1 $
Author:
Peter Antman

Field Summary
protected  javax.management.ObjectName name
           
static javax.management.ObjectName OBJECT_NAME
           
protected  javax.management.MBeanServer server
           
 
Fields inherited from class org.jboss.system.ServiceMBeanSupport
log, serviceName
 
Fields inherited from interface org.jboss.system.ServiceMBean
CREATE_EVENT, CREATED, DESTROY_EVENT, DESTROYED, FAILED, STARTED, STARTING, states, STOPPED, STOPPING
 
Constructor Summary
DeployerServiceJMX()
           
 
Method Summary
 void deploy(java.io.InputStream wsdd)
           
 void deploy(java.lang.String fileName)
           
protected  javax.management.ObjectName getObjectName(javax.management.MBeanServer server, javax.management.ObjectName name)
           
 int getPort()
           
protected  java.lang.String[] getPropertiesAsArgs()
           
 java.lang.String getServletPath()
           
 java.lang.String getUser()
           
 org.w3c.dom.Element getWsdd()
           
 java.lang.String getWsddFileName()
           
protected  java.io.InputStream getWsddFromElement(org.w3c.dom.Element wsddEl)
           
protected  java.io.InputStream getWsddFromFile(java.lang.String fileName)
           
 java.lang.String getWsddServiceName()
           
 org.w3c.dom.Element getWsddUndep()
           
 java.lang.String getWsddUndepFileName()
           
 void process(java.io.InputStream wsdd)
           
 void setPassport(java.lang.String password)
           
 void setPort(int port)
          Set the port of the webapp container.
 void setServletPath(java.lang.String servletPath)
          Set the servlet path of the deployed axis admin service.
 void setUser(java.lang.String user)
           
 void setWsdd(org.w3c.dom.Element wsddEl)
          Set the deployment wsdd as xml.
 void setWsddFileName(java.lang.String wsddFileName)
          Set the filename of a wsdd file to use.
 void setWsddServiceName(java.lang.String serviceName)
          if the deployed service only contains one service and no global handlers, use this.
 void setWsddUndep(org.w3c.dom.Element wsddUndepEl)
          Set wsdd undeployment xml.
 void setWsddUndepFileName(java.lang.String wsddUndepFileName)
          Set the filename of a wsdd undeoloyment file.
protected  void startService()
          Start service ans deploy any give service, try with includes xml first, then file.
protected  void stopService()
          Stop and undeploy any webservices.
 void undeploy(java.io.InputStream wsdd)
           
 void undeploy(java.lang.String fileName)
           
 void undeployService(java.lang.String serviceName)
           
 
Methods inherited from class org.jboss.system.ServiceMBeanSupport
create, createService, destroy, destroyService, getLog, getName, getNextNotificationSequenceNumber, getServer, getServiceName, getState, getStateString, 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.system.ServiceMBean
getName, getState, getStateString
 
Methods inherited from interface org.jboss.system.Service
create, destroy, start, stop
 

Field Detail

OBJECT_NAME

public static final javax.management.ObjectName OBJECT_NAME

name

protected javax.management.ObjectName name

server

protected javax.management.MBeanServer server
Constructor Detail

DeployerServiceJMX

public DeployerServiceJMX()
Method Detail

getObjectName

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

setPort

public void setPort(int port)
Set the port of the webapp container.

Specified by:
setPort in interface org.backsource.axis.DeployerServiceJMXMBean

getPort

public int getPort()
Specified by:
getPort in interface org.backsource.axis.DeployerServiceJMXMBean

setServletPath

public void setServletPath(java.lang.String servletPath)
Set the servlet path of the deployed axis admin service.

Specified by:
setServletPath in interface org.backsource.axis.DeployerServiceJMXMBean

getServletPath

public java.lang.String getServletPath()
Specified by:
getServletPath in interface org.backsource.axis.DeployerServiceJMXMBean

setPassport

public void setPassport(java.lang.String password)
Specified by:
setPassport in interface org.backsource.axis.DeployerServiceJMXMBean

setUser

public void setUser(java.lang.String user)
Specified by:
setUser in interface org.backsource.axis.DeployerServiceJMXMBean

getUser

public java.lang.String getUser()
Specified by:
getUser in interface org.backsource.axis.DeployerServiceJMXMBean

setWsdd

public void setWsdd(org.w3c.dom.Element wsddEl)
Set the deployment wsdd as xml.

Specified by:
setWsdd in interface org.backsource.axis.DeployerServiceJMXMBean

getWsdd

public org.w3c.dom.Element getWsdd()
Specified by:
getWsdd in interface org.backsource.axis.DeployerServiceJMXMBean

setWsddFileName

public void setWsddFileName(java.lang.String wsddFileName)
Set the filename of a wsdd file to use.

Specified by:
setWsddFileName in interface org.backsource.axis.DeployerServiceJMXMBean

getWsddFileName

public java.lang.String getWsddFileName()
Specified by:
getWsddFileName in interface org.backsource.axis.DeployerServiceJMXMBean

setWsddUndep

public void setWsddUndep(org.w3c.dom.Element wsddUndepEl)
Set wsdd undeployment xml.

Specified by:
setWsddUndep in interface org.backsource.axis.DeployerServiceJMXMBean

getWsddUndep

public org.w3c.dom.Element getWsddUndep()

setWsddUndepFileName

public void setWsddUndepFileName(java.lang.String wsddUndepFileName)
Set the filename of a wsdd undeoloyment file.

Specified by:
setWsddUndepFileName in interface org.backsource.axis.DeployerServiceJMXMBean

getWsddUndepFileName

public java.lang.String getWsddUndepFileName()
Specified by:
getWsddUndepFileName in interface org.backsource.axis.DeployerServiceJMXMBean

setWsddServiceName

public void setWsddServiceName(java.lang.String serviceName)
if the deployed service only contains one service and no global handlers, use this.

Specified by:
setWsddServiceName in interface org.backsource.axis.DeployerServiceJMXMBean

getWsddServiceName

public java.lang.String getWsddServiceName()
Specified by:
getWsddServiceName in interface org.backsource.axis.DeployerServiceJMXMBean

startService

protected void startService()
                     throws java.lang.Exception
Start service ans deploy any give service, try with includes xml first, then file.

Throws:
java.lang.Exception

stopService

protected void stopService()
                    throws java.lang.Exception
Stop and undeploy any webservices. if a name is given, that service is deployed, othervise embedded xml and last file is tested.

Throws:
java.lang.Exception

getWsddFromElement

protected java.io.InputStream getWsddFromElement(org.w3c.dom.Element wsddEl)
                                          throws org.backsource.utils.xml.XmlException
Throws:
org.backsource.utils.xml.XmlException

getWsddFromFile

protected java.io.InputStream getWsddFromFile(java.lang.String fileName)
                                       throws java.io.IOException
Throws:
java.io.IOException

getPropertiesAsArgs

protected java.lang.String[] getPropertiesAsArgs()

deploy

public void deploy(java.lang.String fileName)
            throws java.lang.Exception
Specified by:
deploy in interface org.backsource.axis.DeployerServiceJMXMBean
Throws:
java.lang.Exception

deploy

public void deploy(java.io.InputStream wsdd)
            throws java.lang.Exception
Specified by:
deploy in interface org.backsource.axis.DeployerServiceJMXMBean
Throws:
java.lang.Exception

undeploy

public void undeploy(java.lang.String fileName)
              throws java.lang.Exception
Specified by:
undeploy in interface org.backsource.axis.DeployerServiceJMXMBean
Throws:
java.lang.Exception

undeploy

public void undeploy(java.io.InputStream wsdd)
              throws java.lang.Exception
Specified by:
undeploy in interface org.backsource.axis.DeployerServiceJMXMBean
Throws:
java.lang.Exception

process

public void process(java.io.InputStream wsdd)
             throws java.lang.Exception
Specified by:
process in interface org.backsource.axis.DeployerServiceJMXMBean
Throws:
java.lang.Exception

undeployService

public void undeployService(java.lang.String serviceName)
                     throws java.lang.Exception
Specified by:
undeployService in interface org.backsource.axis.DeployerServiceJMXMBean
Throws:
java.lang.Exception


Copyright © 2003-2004 Backsource. All Rights Reserved.