Jürgen Bockhorn created CXF-5388:
------------------------------------
Summary: 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.1#6144)