cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Grzegorz Grzybek (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-5388) Can't register two similar callbacks to different services
Date Mon, 07 Apr 2014 05:39:15 GMT

    [ https://issues.apache.org/jira/browse/CXF-5388?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13961649#comment-13961649
] 

Grzegorz Grzybek commented on CXF-5388:
---------------------------------------

[~jaybee] hello - could you confirm that this workaround works for you? I don't think it could
be _fixed_ in CXF anyway...

regards
Grzegorz Grzybek

> Can't register two similar callbacks to different services
> ----------------------------------------------------------
>
>                 Key: CXF-5388
>                 URL: https://issues.apache.org/jira/browse/CXF-5388
>             Project: CXF
>          Issue Type: Bug
>          Components: CORBA Binding
>    Affects Versions: 2.7.8
>         Environment: Windows / JAVA 7/ CXF 2.7.8-SNAPSHOT
>            Reporter: Jürgen Bockhorn
>            Priority: Blocker
>
> Hi,
> our client application we need to register multiple similar callbacks to different similar
services.
> This is done by using this code:
> {code}
> 		    JaxWsServerFactoryBean svrFactory = new JaxWsServerFactoryBean();
> 		    svrFactory.setServiceClass(CallbackImpl.class);
> 		    
> 		    //Attention: It is necessary that thre is at least one character after the IOR:.
Doesn't matter which character(s). 
>                     //Whithout this it's not a legal URL
> 		    svrFactory.setAddress("IOR:callback");
> 		    svrFactory.setEndpointName( new QName( http://zst.heuboe.de", 
> 		            "CallbackCORBAPort" ) );
> 		    svrFactory.setServiceName(  new QName( "http://zst.heuboe.de", 
> 		            "CallbackCORBAService" ) ); 
> 		    svrFactory.setServiceBean(new CallbackImpl());
> 		    svrFactory.setWsdlLocation("classpath:guiService.wsdl");
> 		    svrFactory.getInInterceptors().add(new LoggingInInterceptor());
> 		    svrFactory.getOutInterceptors().add(new LoggingOutInterceptor());
> 		    Server s = svrFactory.create();
> 		    EndpointReferenceType epr = s.getDestination().getAddress();
> 		    Source src = EndpointReferenceUtils.convertToXML(epr);
> 		    W3CEndpointReference ref = new W3CEndpointReference(src);
> {code}
> If you call this code a second time you get an exception in CorbaDestination at this
point:
> {code:title=CorbaDestination-Snipplet}
>             // When using object references, we can run into a situation where
>             // we are implementing
>             // multiple instances of the same port type such that we would end
>             // up using the same
>             // poaname for each when persistance is used. Handle this case by
>             // not throwing an
>             // exception at this point during the activation, we should see an
>             // exception if we try
>             // an activate two objects with the same servant ID instead.
>             if (bindingPOA != null && !isPersistent && serviceId == null)
{
>                 throw new CorbaBindingException(
>                         "Corba Port activation failed because the poa "
>                                 + poaName + " already exists");
>             } else if (bindingPOA == null) {
>                 bindingPOA = createPOA(poaName, rootPOA, poaManager);
>             }
> {code}
> In my opinion it should be possible to register multiple callbacks of the same 'type'.
> Thx
> Jürgen



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message