Source:
<code>public BackendImplementor<?> create(String name, BackendBuildContext buildContext, ConfigurationPropertySource propertySource) { EventContext backendContext = EventContexts.fromBackendName( name ); ElasticsearchClientFactory clientFactory = new ElasticsearchClientFactoryImpl(); boolean logPrettyPrinting = LOG_JSON_PRETTY_PRINTING.get( propertySource ); GsonProvider initialGsonProvider = DefaultGsonProvider.create( GsonBuilder::new, logPrettyPrinting ); ElasticsearchClientImplementor client = clientFactory.create( propertySource, initialGsonProvider ); try { GsonProvider dialectSpecificGsonProvider = DefaultGsonProvider.create( this::createES5GsonBuilderBase, logPrettyPrinting ); client.init( dialectSpecificGsonProvider ); MultiTenancyStrategy multiTenancyStrategy = getMultiTenancyStrategy( name, propertySource ); ElasticsearchWorkFactory workFactory = new ElasticsearchStubWorkFactory( dialectSpecificGsonProvider, multiTenancyStrategy ); ElasticsearchWorkBuilderFactory workBuilderFactory = new ElasticsearchWorkBuilderFactoryImpl( dialectSpecificGsonProvider ); ElasticsearchAnalysisDefinitionRegistry analysisDefinitionRegistry = getAnalysisDefinitionRegistry( backendContext, buildContext, propertySource ); return new ElasticsearchBackendImpl( <START> client, name, workFactory, workBuilderFactory, <END> analysisDefinitionRegistry, multiTenancyStrategy ); } catch (RuntimeException e) { new SuppressingCloser( e ).push( ElasticsearchClientImplementor::close, client ); throw e; } }</code><technical_language>I suppose this is temporary, want create commit work want compile in meantime? Ultimately (at end of this PR) work factory (the one) disappear, right</technical_language>

Target:
public BackendImplementor<?> create(String name, BackendBuildContext buildContext, ConfigurationPropertySource propertySource) { EventContext backendContext = EventContexts.fromBackendName( name ); boolean logPrettyPrinting = LOG_JSON_PRETTY_PRINTING.get( propertySource ); GsonProvider initialGsonProvider = DefaultGsonProvider.create( GsonBuilder::new, logPrettyPrinting ); ElasticsearchClientImplementor client = null; try { BeanProvider beanProvider = buildContext.getServiceManager().getBeanProvider(); try ( BeanHolder<? extends ElasticsearchClientFactory> clientFactoryHolder = CLIENT_FACTORY.getAndTransform( propertySource, beanProvider::getBean ) ) { client = clientFactoryHolder.get().create( propertySource, initialGsonProvider ); } GsonProvider dialectSpecificGsonProvider = DefaultGsonProvider.create( this::createES5GsonBuilderBase, logPrettyPrinting ); client.init( dialectSpecificGsonProvider ); Gson userFacingGson = new GsonBuilder().setPrettyPrinting().create(); ElasticsearchWorkBuilderFactory workFactory = new ElasticsearchWorkBuilderFactoryImpl( dialectSpecificGsonProvider ); ElasticsearchAnalysisDefinitionRegistry analysisDefinitionRegistry = getAnalysisDefinitionRegistry( backendContext, buildContext, propertySource ); return new ElasticsearchBackendImpl( client, dialectSpecificGsonProvider, name, workFactory, userFacingGson, analysisDefinitionRegistry, getMultiTenancyStrategy( name, propertySource ) ); } catch (RuntimeException e) { new SuppressingCloser( e ).push( ElasticsearchClientImplementor::close, client ); throw e; } }