.getAutomaticWorkQueue());
}
protected Configuration createConfiguration() {
Configuration busCfg = getBinding().getBus().getConfiguration();
ConfigurationBuilder builder = ConfigurationBuilderFactory.getBuilder();
Configuration parent;
org.objectweb.celtix.ws.addressing.EndpointReferenceType ref = getBinding().getEndpointReference();
if (null != clientBinding) {
String id = EndpointReferenceUtils.getServiceName(ref).toString()
+ "/" + EndpointReferenceUtils.getPortName(ref);
parent = builder.getConfiguration(ServiceImpl.PORT_CONFIGURATION_URI,
id, busCfg);
} else {
parent = builder.getConfiguration(EndpointImpl.ENDPOINT_CONFIGURATION_URI, EndpointReferenceUtils
.getServiceName(ref).toString(), busCfg);
}
Configuration cfg = builder.getConfiguration(RM_CONFIGURATION_URI, RM_CONFIGURATION_ID, parent);
if (null == cfg) {
cfg = builder.buildConfiguration(RM_CONFIGURATION_URI, RM_CONFIGURATION_ID, parent);
}
boolean policyProviderRegistered = false;
for (ConfigurationProvider p : cfg.getProviders()) {
if (p instanceof RMPolicyProvider) {
policyProviderRegistered = true;
break;
}
}
if (!policyProviderRegistered) {
cfg.getProviders().add(new RMPolicyProvider(getBinding().getBus(),
getBinding().getEndpointReference()));
}
return cfg;