Search in sources :

Example 1 with ClusteredGreeterService

use of org.apache.cxf.greeter_control.ClusteredGreeterService in project cxf by apache.

the class FailoverTest method getGreeter.

protected Greeter getGreeter(String type) throws Exception {
    if (REPLICA_A.equals(type)) {
        Greeter g = new ClusteredGreeterService().getReplicatedPortA();
        updateAddressPort(g, PORT_A);
        updateWsdlExtensors("9051", PORT_A);
        return g;
    } else if (REPLICA_B.equals(type)) {
        Greeter g = new ClusteredGreeterService().getReplicatedPortB();
        updateAddressPort(g, PORT_B);
        updateWsdlExtensors("9052", PORT_B);
        return g;
    } else if (REPLICA_C.equals(type)) {
        Greeter g = new ClusteredGreeterService().getReplicatedPortC();
        updateAddressPort(g, PORT_C);
        updateWsdlExtensors("9053", PORT_C);
        return g;
    }
    Greeter g = new ClusteredGreeterService().getReplicatedPortE();
    updateAddressPort(g, PORT_E);
    updateWsdlExtensors("9055", PORT_E);
    return g;
}
Also used : Greeter(org.apache.cxf.greeter_control.Greeter) ClusteredGreeterService(org.apache.cxf.greeter_control.ClusteredGreeterService)

Example 2 with ClusteredGreeterService

use of org.apache.cxf.greeter_control.ClusteredGreeterService in project cxf by apache.

the class FailoverTest method setupGreeter.

protected void setupGreeter() throws Exception {
    ClusteredGreeterService cs = new ClusteredGreeterService();
    // REVISIT: why doesn't the generic (i.e. non-Port-specific)
    // Service.getPort() load the <jaxws:client> configuration?
    greeter = cs.getReplicatedPortA();
    updateAddressPort(greeter, PORT_A);
    assertTrue("unexpected conduit selector: " + ClientProxy.getClient(greeter).getConduitSelector().getClass().getName(), ClientProxy.getClient(greeter).getConduitSelector() instanceof FailoverTargetSelector);
    updateWsdlExtensors("9051", PORT_A);
    updateWsdlExtensors("9052", PORT_B);
    updateWsdlExtensors("9053", PORT_C);
    updateWsdlExtensors("9055", PORT_E);
}
Also used : ClusteredGreeterService(org.apache.cxf.greeter_control.ClusteredGreeterService) FailoverTargetSelector(org.apache.cxf.clustering.FailoverTargetSelector)

Aggregations

ClusteredGreeterService (org.apache.cxf.greeter_control.ClusteredGreeterService)2 FailoverTargetSelector (org.apache.cxf.clustering.FailoverTargetSelector)1 Greeter (org.apache.cxf.greeter_control.Greeter)1