Thursday, July 28, 2011

Publishing WS endpoints through AS7 services

JBoss AS 7.0.0 Final has been released and is available to the community, so we're currently working on the 7.1.0 version of the application server, which is coming with many webservices functionalities additions. While most of them will be aim at covering JCP specification requirements (mainly JSR-109 and JSR-101), some management and general use new features are also coming soon.

Recently it's been the turn of JBoss XTS for being integrated in JBoss AS 7.
XTS provides transaction support for web services, implementing WS-AtomicTransaction and WS-BusinessActivity specifications. In order for providing such functionalities, XTS needs to start a given number of WS endpoints to take part into the transactions management. According to the JBoss AS 7 design, this is to be achieved using JBoss AS 7 services.

Publishing a WS endpoints on JBoss AS7 was previously directly bound to the processing of a given deployment unit having webservices endpoint implementation classes in it. So the required steps for achieving our goal were:

  1. abstracting the endpoint publish process away from the deployment processing; that was possible thanks to the already existing convenient split of JBossWS endpoint publish logic into deployment aspect blocks, completely hidden behind the JBossWS SPI (iow the JBossWS internals do not directly rely on JBoss AS classes)

  2. defining a simple API for publishing POJO endpoints given the endpoint class names, classloader and publish address

  3. providing a JBoss AS7 implementation for such an API

  4. serving that through an AS7 service


We ended up with a solution that might appear pretty much equivalent to the JAX-WS Endpoint.publish(..) API at first sight, except it
  • allows for publishing an endpoint to the HTTP server of the currently running JBoss AS 7 instance

  • is embedded into a JBoss AS 7 service, allowing efficient, concurrent and perhaps even lazy/on-demand start/stop of endpoints as part of AS7 operations (for instance, the boot)



The XTS integration easily leveraged the new JBossWS feature, installing and setting up dependencies on multiple WS endpoint publisher services.

You can have a look at this by checking out the latest JBoss AS 7 master from github and starting the standalone-xts.xml profile. During the boot, XTS subsystem and its 14 required WS endpoints are concurrently started in something like 2.5s on a my mid-level laptop ;-)
If you're writing your own AS7 component and need publishing a WS POJO endpoints as part of that, consider giving this new feature a try.

Thursday, July 7, 2011

JBoss AS 7 webservices features

JBoss Application Server 7 is highly configurable and allows for running different profiles, including one or more subsystems. The optional webservices subsystem is based on JBossWS-CXF 4.x.

JBoss AS7 users can turn on full webservices capabilities by enabling the org.jboss.as.webservices module extension and the webservices subsystem in their standalone.xml / domain.xml descriptors:


<server name="foo" xmlns="urn:jboss:domain:1.0">
    <extensions>
        [...]
        <extension module="org.jboss.as.webservices"/>
        [...]
    </extensions>
    [...]
    <profile>
        [...]
        <subsystem xmlns="urn:jboss:domain:webservices:1.0" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:jaxwsconfig="urn:jboss:jbossws-jaxws-config:4.0">
            <wsdl-host>localhost</wsdl-host>
            <modify-wsdl-address>true</modify-wsdl-address>
        </subsystem>
        [...]
    </profile>
    [...]
</server>

On JBoss AS 7 Final, the webservices extension / subsystem is already enabled and available in a separate domain configuration, domain-preview.xml / standalone-preview.xml. Users can run a given server configuration as follows:

./bin/standalone.sh -server-config standalone-preview.xml


Once the webservices capabilities are enabled, basic JAXWS features as well as advanced WS-* functionalities are available.
The JBossWS 4.x documentation covers all the details, including full JAXWS user guide , JAXWS tooling and quick start sections.

Moreover, examples are also provided on advanced topics:

JBossWS 5.4.0.FInal is released !

I am pleased to annouce JBossWS 5.4.0 Final is out. In this release we upgraded many components as usual and brings Elytron client configur...