All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openbp.config.context.InMemoryTokenConfig Maven / Gradle / Ivy

There is a newer version: 0.9.11
Show newest version
package org.openbp.config.context;

import org.openbp.server.context.TokenContextService;
import org.openbp.server.context.TransientTokenContextService;
import org.openbp.server.persistence.PersistenceContextProvider;
import org.openbp.server.persistence.dummy.DummyPersistenceContextProvider;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Spring configuration supporting transient (in-memory only) token context management.
 * Supports running tokens in memory for processes that do not need to persist their state in the database
 * (i. e. do not require wait states or error recovery).
 */
@Configuration
public class InMemoryTokenConfig
{
	@Bean
	public TokenContextService tokenContextService()
	{
		return new TransientTokenContextService();
	}

	@Bean
	public PersistenceContextProvider persistenceContextProvider()
	{
		return new DummyPersistenceContextProvider();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy