org.objectweb.jonas.ws
Class AbsWebServicesServiceImpl

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.objectweb.jonas.management.ReconfigDispatcher
          extended by org.objectweb.jonas.service.AbsServiceImpl
              extended by org.objectweb.jonas.ws.AbsWebServicesServiceImpl
All Implemented Interfaces:
javax.management.NotificationBroadcaster, javax.management.NotificationEmitter, ReconfigDispatcherMBean, Service, AbsWebServicesServiceImplMBean, WebServicesService
Direct Known Subclasses:
AxisWSServiceImpl

public abstract class AbsWebServicesServiceImpl
extends AbsServiceImpl
implements WebServicesService, AbsWebServicesServiceImplMBean

implements deployment process and declares commons abstract methods for all (used) Web services engine. Actually we consider Glue and AXIS.

Author:
Guillaume Sauthier, Xavier Delplanque

Nested Class Summary
 class AbsWebServicesServiceImpl.WSDeployInfo
          Store information about a webservices descriptor.
 
Field Summary
static java.lang.String PARSINGWITHVALIDATION
          WebServices service configuration properties : Xml parsing with validation
static java.lang.String WS_BASE
          WebServices service configuration properties : base for web services properties.
static java.lang.String WSDL_HANDLERS
          WebServices service configuration properties : WSDL handlers
 
Fields inherited from class org.objectweb.jonas.management.ReconfigDispatcher
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Fields inherited from interface org.objectweb.jonas.ws.WebServicesService
CLASSLOADER_CTX_PARAM, ISINEAR_CTX_PARAM, PARENT_OBJECTNAME_CTX_PARAM, WARURL_CTX_PARAM
 
Constructor Summary
AbsWebServicesServiceImpl()
           
 
Method Summary
 void completeWSDeployment(javax.naming.Context ctx)
          Complete the WebServices Deployment (add informations in web environment)
 void deployWebServices(javax.naming.Context ctx)
          Get, update and publish WSDL documents contained in a set of jars and wars.
protected  void doDeployWebServices(javax.naming.Context ctx)
          Deploy the given Web services.
protected  void doInit(javax.naming.Context ctx)
          Initialize the service.
 void doStart()
          Empty Method for WebServices (no running application).
 void doStop()
          Empty Method for WebServices (no running application).
protected static I18n getI18n()
           
protected static org.objectweb.util.monolog.api.Logger getLogger()
           
 void removeCache(java.lang.ClassLoader cl)
          Remove WebServices descriptors associated to the given ClassLoader
 void undeployWebServices(javax.naming.Context ctx)
          Undeploy the WebServices : unpublish WSDL + unregister MBeans
 
Methods inherited from class org.objectweb.jonas.service.AbsServiceImpl
getDomainName, getJonasServerName, getName, init, isStarted, setName, start, stop
 
Methods inherited from class org.objectweb.jonas.management.ReconfigDispatcher
addNotificationListener, getFilter, getHandback, getListener, getNotificationInfo, initLogger, removeNotificationListener, sendReconfigNotification, sendSaveNotification
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
handleNotification, 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.objectweb.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Field Detail

PARSINGWITHVALIDATION

public static final java.lang.String PARSINGWITHVALIDATION
WebServices service configuration properties : Xml parsing with validation

See Also:
Constant Field Values

WSDL_HANDLERS

public static final java.lang.String WSDL_HANDLERS
WebServices service configuration properties : WSDL handlers

See Also:
Constant Field Values

WS_BASE

public static final java.lang.String WS_BASE
WebServices service configuration properties : base for web services properties.

See Also:
Constant Field Values
Constructor Detail

AbsWebServicesServiceImpl

public AbsWebServicesServiceImpl()
Method Detail

doInit

protected void doInit(javax.naming.Context ctx)
               throws ServiceException
Initialize the service.

Specified by:
doInit in class AbsServiceImpl
Parameters:
ctx - the configuration context of the service.
Throws:
ServiceException - if the initialization failed.

deployWebServices

public void deployWebServices(javax.naming.Context ctx)
                       throws WSServiceException
Get, update and publish WSDL documents contained in a set of jars and wars.

Specified by:
deployWebServices in interface WebServicesService
Parameters:
ctx - the context containing the configuration to deploy the wars.
This context contains the following parameters :
- jarUrls the list of the urls of the jars to deploy.
- warUrls the list of the urls of the wars to deploy.
- ejbClassLoader the classLoader of the ejbs(used for webapps too).
- earClassLoader the ear classLoader of the j2ee app.
- warCtxRootMapping the webapps contextRoots with associated war name.
- unpackDir the directory where EAR has been unpacked (optionnal for pure webapp webservices).
Throws:
WSServiceException - if an error occurs during the deployment.

doDeployWebServices

protected void doDeployWebServices(javax.naming.Context ctx)
                            throws WSServiceException
Deploy the given Web services.

Parameters:
ctx - Context used for parameter passing.
Throws:
WSServiceException - when error occurs.

doStop

public void doStop()
            throws ServiceException
Empty Method for WebServices (no running application).

Specified by:
doStop in class AbsServiceImpl
Throws:
ServiceException - never thrown

doStart

public void doStart()
             throws ServiceException
Empty Method for WebServices (no running application).

Specified by:
doStart in class AbsServiceImpl
Throws:
ServiceException - never thrown

removeCache

public void removeCache(java.lang.ClassLoader cl)
Remove WebServices descriptors associated to the given ClassLoader

Specified by:
removeCache in interface WebServicesService
Parameters:
cl - key ClassLoader

getI18n

protected static I18n getI18n()
Returns:
Returns the i18n.

getLogger

protected static org.objectweb.util.monolog.api.Logger getLogger()
Returns:
Returns the logger.

completeWSDeployment

public void completeWSDeployment(javax.naming.Context ctx)
                          throws WSServiceException
Description copied from interface: WebServicesService
Complete the WebServices Deployment (add informations in web environment)

Specified by:
completeWSDeployment in interface WebServicesService
Parameters:
ctx - Context containing the key ClassLoader
Throws:
WSServiceException - When Endpoints URLs binding fails
See Also:
WebServicesService.completeWSDeployment(javax.naming.Context)

undeployWebServices

public void undeployWebServices(javax.naming.Context ctx)
                         throws WSServiceException
Description copied from interface: WebServicesService
Undeploy the WebServices : unpublish WSDL + unregister MBeans

Specified by:
undeployWebServices in interface WebServicesService
Parameters:
ctx - Context containing undeployment informations
Throws:
WSServiceException - When undeployment fails
See Also:
WebServicesService.undeployWebServices(javax.naming.Context)