org.ow2.petals.se.jsr181
Class Jsr181Se

java.lang.Object
  extended by org.ow2.petals.component.framework.AbstractComponent
      extended by org.ow2.petals.component.framework.se.AbstractServiceEngine
          extended by org.ow2.petals.se.jsr181.Jsr181Se
All Implemented Interfaces:
javax.jbi.component.Component, javax.jbi.component.ComponentLifeCycle, org.ow2.petals.component.framework.api.PetalsComponent

public class Jsr181Se
extends org.ow2.petals.component.framework.se.AbstractServiceEngine

The JSR-181 service engine.

Since:
1.0
Author:
Christophe HAMERLING - EBM WebSourcing, Vincent Zurczak - EBM WebSourcing

Field Summary
 
Fields inherited from class org.ow2.petals.component.framework.AbstractComponent
context
 
Constructor Summary
Jsr181Se()
          Creates a new instance of Jsr181Se.
 
Method Summary
 org.ow2.petals.component.framework.su.AbstractServiceUnitManager createServiceUnitManager()
           
protected  void doInit()
           
 Axis2Deployer getAxis2Deployer()
           
 org.apache.axis2.context.ConfigurationContext getAxisContext()
           
 JaxConfigurationHandler getJaxConfigurationHandler(java.lang.String endpointName)
           
 org.w3c.dom.Document getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint endpoint)
          Gets the WSDL definition from the SU.
 JaxConfigurationHandler registerJaxConfigurationHandler(java.lang.String endpointName, JaxConfigurationHandler jaxConfigurationHandler)
           
 JaxConfigurationHandler removeJaxConfigurationHandler(java.lang.String endpointName)
           
 
Methods inherited from class org.ow2.petals.component.framework.AbstractComponent
activateEndpoint, deactivateEndpoint, doShutdown, doStart, doStop, getAsyncManager, getChannel, getComponentConfiguration, getComponentExtensions, getContext, getExtensionMBeanName, getInterceptor, getInterceptors, getLifeCycle, getLogger, getNativeWsdl, getProcessorManager, getResourceBundleName, getServiceUnitManager, init, isExchangeWithConsumerOkay, isExchangeWithProviderOkay, resolveEndpointReference, shutDown, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Jsr181Se

public Jsr181Se()
Creates a new instance of Jsr181Se.

Method Detail

doInit

protected void doInit()
               throws javax.jbi.JBIException
Overrides:
doInit in class org.ow2.petals.component.framework.AbstractComponent
Throws:
javax.jbi.JBIException

getServiceDescription

public org.w3c.dom.Document getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint endpoint)
Gets the WSDL definition from the SU.

At first glance, it seems obvious this component should generate the WSDL on deployment.
The problem is that Petals has redundant declarations: interfaces, services and end-points are declared in both the WSDL and in the jbi.xml. With JAX-WS, there are also defined in the class.

Changing the WSDL means changing the jbi.xml. Same thing if we generate the WSDL at deployment time.
Taking this way implies the component should also generate the jbi.xml.
It means the WSDL and jbi.xml generation should be done in Jsr181SuManager.doDeploy(String, String, org.ow2.petals.component.framework.jbidescriptor.generated.Jbi).

FIXME: Maybe we should consider that other artifacts (than SU) could be deployed on this component.
SU would have to contain everything.
And WAR could be used to generate a SU on the fly.

(non-Javadoc)

Specified by:
getServiceDescription in interface javax.jbi.component.Component
Overrides:
getServiceDescription in class org.ow2.petals.component.framework.AbstractComponent
See Also:
#getServiceDescription(javax.jbi.servicedesc.ServiceEndpoint)

getAxisContext

public org.apache.axis2.context.ConfigurationContext getAxisContext()
Returns:
the Axis context managed by the component instance

getAxis2Deployer

public Axis2Deployer getAxis2Deployer()
Returns:
the Axis2 deployer managed by the component instance

createServiceUnitManager

public org.ow2.petals.component.framework.su.AbstractServiceUnitManager createServiceUnitManager()
Overrides:
createServiceUnitManager in class org.ow2.petals.component.framework.se.AbstractServiceEngine

getJaxConfigurationHandler

public JaxConfigurationHandler getJaxConfigurationHandler(java.lang.String endpointName)
Parameters:
endpointName - the end-point name
Returns:
the associated JAX configuration handler
See Also:
ConcurrentHashMap.get(java.lang.Object)

registerJaxConfigurationHandler

public JaxConfigurationHandler registerJaxConfigurationHandler(java.lang.String endpointName,
                                                               JaxConfigurationHandler jaxConfigurationHandler)
Parameters:
endpointName - the end-point name
jaxConfigurationHandler - the JAX configuration handler to register
Returns:
the JAX configuration handler that was registered for this end-point name
See Also:
ConcurrentHashMap.put(java.lang.Object, java.lang.Object)

removeJaxConfigurationHandler

public JaxConfigurationHandler removeJaxConfigurationHandler(java.lang.String endpointName)
Parameters:
endpointName - the end-point name
Returns:
the JAX configuration handler that was registered for this end-point name
See Also:
ConcurrentHashMap.remove(java.lang.Object)


Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.