private JAXRConnectionFactoryService() {
}
@Override
public void start(final StartContext context) throws StartException {
JAXRConfiguration config = injectedConfig.getValue();
if (config.getConnectionFactoryBinding() != null) {
try {
String jndiName = config.getConnectionFactoryBinding();
ContextNames.BindInfo bindInfo = ContextNames.bindInfoFor(jndiName);
BinderService binderService = new BinderService(bindInfo.getBindName());
ConnectionFactory jaxrFactory = loadConnectionFactoryImplementation(config);
//set jaxr properties from the config if there are any
setJAXRFactoryProperies(jaxrFactory, config.getProperties());
ImmediateValue<ConnectionFactory> value = new ImmediateValue<ConnectionFactory>(jaxrFactory);
binderService.getManagedObjectInjector().inject(new ValueManagedReferenceFactory(value));
binderService.getNamingStoreInjector().inject((ServiceBasedNamingStore) injectedJavaContext.getValue());
ServiceBuilder<?> builder = context.getChildTarget().addService(bindInfo.getBinderServiceName(), binderService);
JAXR_LOGGER.bindingJAXRConnectionFactory(config.getConnectionFactoryBinding());
builder.install();
} catch (Exception ex) {
JAXR_LOGGER.bindingJAXRConnectionFactoryFailed();
}
}