org.ow2.jonas.ws.cxf
Class CXFService

java.lang.Object
  extended by javax.management.NotificationBroadcasterSupport
      extended by org.ow2.jonas.lib.reconfig.ReconfigEmitter
          extended by org.ow2.jonas.lib.service.AbsServiceImpl
              extended by org.ow2.jonas.ws.jaxws.base.JAXWSService
                  extended by org.ow2.jonas.ws.cxf.CXFService
All Implemented Interfaces:
NotificationBroadcaster, NotificationEmitter, Service, JAXWSServiceMBean, IJAXWSService

public class CXFService
extends JAXWSService
implements IJAXWSService

The CXFService class is used to declare CXF as a module in JOnAS.

Author:
Guillaume Sauthier

Field Summary
 
Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter
RECONFIG_TYPE, SAVE_RECONFIG_TYPE
 
Fields inherited from interface org.ow2.jonas.ws.jaxws.IJAXWSService
KEY_WEB_SERVICES_METADATAS
 
Constructor Summary
CXFService()
          Default constructor.
 
Method Summary
 void bindEventService(org.ow2.util.event.api.IEventService eventService)
          Callback invoked when an EventService becomes available.
protected  void checkEnableMtom(org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean jaxWsServiceFactoryBean, JOnASJaxWsImplementorInfo info)
          Enable MTOM feature on CXF service factory if it is enabled.
 Reference createNamingReference(org.ow2.util.ee.metadata.common.api.struct.IJaxwsWebServiceRef serviceRef)
          Construct a Reference dedicated to the given @WebServiceRef metadata.
 IWebServiceEndpoint createPOJOWebServiceEndpoint(org.ow2.util.ee.metadata.war.api.IWarClassMetadata metadata, ClassLoader loader, ServletContext servletContext)
          Creates a new POJO Web service endpoint from classes metadata.
protected  void doStart()
          Abstract start-up method to be implemented by sub-classes.
protected  void doStop()
          Abstract method for service stopping to be implemented by sub-classes.
 void finalizePOJODeployment(ServletContext context)
          Finalize the deployment of POJO endpoints contained in the given ServletContext.
 void setWSDLPublisherManager(WSDLPublisherManager publisherManager)
          Set the WSDLPublisherManager service.
 void unbindEventService(org.ow2.util.event.api.IEventService eventService)
          Callback invoked when the used EventService becomes unavalable.
 void undeployPOJOEndpoints(ServletContext context)
          Stop and undeploy the POJO endpoints contained in the given ServletContext.
 
Methods inherited from class org.ow2.jonas.ws.jaxws.base.JAXWSService
getJmxService, setJmxService
 
Methods inherited from class org.ow2.jonas.lib.service.AbsServiceImpl
convertToList, doInit, getDomainName, getJonasServerName, getName, getServerProperties, init, isStarted, setName, setServerProperties, start, stop, throwRequirementException, toString
 
Methods inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter
initLogger, sendReconfigNotification, sendSaveNotification
 
Methods inherited from class javax.management.NotificationBroadcasterSupport
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.ow2.jonas.service.Service
getName, init, isStarted, setName, start, stop
 

Constructor Detail

CXFService

public CXFService()
Default constructor.

Method Detail

doStart

protected void doStart()
                throws ServiceException
Abstract start-up method to be implemented by sub-classes.

Overrides:
doStart in class JAXWSService
Throws:
ServiceException - service start-up failed

doStop

protected void doStop()
               throws ServiceException
Abstract method for service stopping to be implemented by sub-classes.

Overrides:
doStop in class JAXWSService
Throws:
ServiceException - service stopping failed

createNamingReference

public Reference createNamingReference(org.ow2.util.ee.metadata.common.api.struct.IJaxwsWebServiceRef serviceRef)
                                throws NamingException
Construct a Reference dedicated to the given @WebServiceRef metadata.

Specified by:
createNamingReference in interface IJAXWSService
Parameters:
serviceRef - the reference described by the user.
Returns:
a JNDI Naming Reference that can be bound in a JNDI Context.
Throws:
NamingException

createPOJOWebServiceEndpoint

public IWebServiceEndpoint createPOJOWebServiceEndpoint(org.ow2.util.ee.metadata.war.api.IWarClassMetadata metadata,
                                                        ClassLoader loader,
                                                        ServletContext servletContext)
                                                 throws WSException
Creates a new POJO Web service endpoint from classes metadata.

Specified by:
createPOJOWebServiceEndpoint in interface IJAXWSService
Parameters:
metadata - the class own metadata (annotation + XML)
loader - the ClassLoader to be used to load classes from the metadata
servletContext - the webapp ServletContext (used to locate web resource)
Returns:
A POJO typed IWebServiceEndpoint based on metadata
Throws:
WSException - if it was impossible to create the endpoint (CNFE, ...)

checkEnableMtom

protected void checkEnableMtom(org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean jaxWsServiceFactoryBean,
                               JOnASJaxWsImplementorInfo info)
Enable MTOM feature on CXF service factory if it is enabled.

Parameters:
jaxWsServiceFactoryBean - the CXF service factory bean
info - the annotation merged info

finalizePOJODeployment

public void finalizePOJODeployment(ServletContext context)
Finalize the deployment of POJO endpoints contained in the given ServletContext.

Specified by:
finalizePOJODeployment in interface IJAXWSService
Parameters:
context - ServletContext.

undeployPOJOEndpoints

public void undeployPOJOEndpoints(ServletContext context)
Stop and undeploy the POJO endpoints contained in the given ServletContext.

Specified by:
undeployPOJOEndpoints in interface IJAXWSService
Parameters:
context - ServletContext.

bindEventService

public void bindEventService(org.ow2.util.event.api.IEventService eventService)
Callback invoked when an EventService becomes available.

Parameters:
eventService - the event service

unbindEventService

public void unbindEventService(org.ow2.util.event.api.IEventService eventService)
Callback invoked when the used EventService becomes unavalable.

Parameters:
eventService - disposed service

setWSDLPublisherManager

public void setWSDLPublisherManager(WSDLPublisherManager publisherManager)
Set the WSDLPublisherManager service.

Parameters:
publisherManager - publication tool


Copyright © 2010 OW2 Consortium. All Rights Reserved.