Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5388

Can't register two similar callbacks to different services

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Not A Problem
    • 2.7.8
    • Invalid
    • CORBA Binding
    • None
    • Windows / JAVA 7/ CXF 2.7.8-SNAPSHOT

    • Unknown

    Description

      Hi,
      our client application we need to register multiple similar callbacks to different similar services.

      This is done by using this 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);
      
      

      If you call this code a second time you get an exception in CorbaDestination at this point:

      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);
                  }
      

      In my opinion it should be possible to register multiple callbacks of the same 'type'.

      Thx

      Jürgen

      Attachments

        Activity

          People

            Unassigned Unassigned
            jaybee Jürgen Bockhorn
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: