[jbossts-issues] [JBoss JIRA] (JBTM-999) Support plain old JAX-WS services in TXFramework

Paul Robinson (JIRA) jira-events at lists.jboss.org
Fri Feb 24 06:31:36 EST 2012


    [ https://issues.jboss.org/browse/JBTM-999?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12670759#comment-12670759 ] 

Paul Robinson commented on JBTM-999:
------------------------------------

In case the fpaste expires:

{code}
    package org.jboss.wsf.stack.cxf.interceptor;
     
    import javax.management.ObjectName;
    import javax.xml.ws.WebServiceContext;
    import javax.xml.ws.handler.MessageContext;
     
    import org.apache.cxf.jaxws.context.WrappedMessageContext;
    import org.jboss.wsf.spi.SPIProviderResolver;
    import org.jboss.wsf.spi.classloading.ClassLoaderProvider;
    import org.jboss.wsf.spi.deployment.Endpoint;
    import org.jboss.wsf.spi.deployment.Reference;
    import org.jboss.wsf.spi.invocation.EndpointAssociation;
    import org.jboss.wsf.spi.management.EndpointRegistry;
    import org.jboss.wsf.spi.management.EndpointRegistryFactory;
     
    public class XTSHandler
    {
    //....
    public Object getEndpointInstance() {
    Endpoint endpoint = EndpointAssociation.getEndpoint();
    Reference ref = endpoint.getInstanceProvider().getInstance(endpoint.getTargetBeanName());
    return ref.getValue();
    }
    public Object getEndpointInstanceCXF(MessageContext ctx) {
    Endpoint endpoint = ((WrappedMessageContext)ctx).getWrappedMessage().getExchange().get(Endpoint.class);
    Reference ref = endpoint.getInstanceProvider().getInstance(endpoint.getTargetBeanName());
    return ref.getValue();
    }
    public Object getEndpointInstanceCXF(WebServiceContext ctx) {
    return getEndpointInstanceCXF(ctx.getMessageContext());
    }
    public Object getEndpointInstanceUsingRegistry() {
    ClassLoader cl = ClassLoaderProvider.getDefaultProvider().getServerIntegrationClassLoader();
    EndpointRegistryFactory eprFac = SPIProviderResolver.getInstance(cl).getProvider().getSPI(EndpointRegistryFactory.class, cl);
    EndpointRegistry registry = eprFac.getEndpointRegistry();
    Endpoint endpoint = null;
    for (ObjectName on : registry.getEndpoints()) {
    Endpoint ep = registry.getEndpoint(on);
    //somehow identify your endpoint... name? address?
    if (ep.getAddress().equals("....")) {
    endpoint = ep;
    }
    //...
    }
    Reference ref = endpoint.getInstanceProvider().getInstance(endpoint.getTargetBeanName());
    return ref.getValue();
    }
    }

{code}
                
> Support plain old JAX-WS services in TXFramework 
> -------------------------------------------------
>
>                 Key: JBTM-999
>                 URL: https://issues.jboss.org/browse/JBTM-999
>             Project: JBoss Transaction Manager
>          Issue Type: Feature Request
>      Security Level: Public(Everyone can see) 
>          Components: TXFramework
>    Affects Versions: 5.0.0.M1
>            Reporter: Paul Robinson
>            Assignee: Paul Robinson
>             Fix For: 5.0.0.M2
>
>
> Currently the TXFramework only supports JAX-WS services that are implemented as EJBs. This is because the TXFramework relies heavily on CDI. Plain old JAX-WS services don't seem to be considered by the CDI implementation.
> Need to find out of this is due to a limitation in JBossWS, or whether I missed something when coding up my service.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbossts-issues mailing list