use of org.infinispan.marshall.persistence.impl.PersistenceContextInitializerImpl in project infinispan by infinispan.
the class SerializationContextRegistryImpl method start.
@Start
public void start() {
user.addContextInitializer(new CommonTypesSchema());
user.addContextInitializer(new CommonContainerTypesSchema());
user.addContextInitializer(new UserContextInitializerImpl());
// Add user configured SCIs
Collection<SerializationContextInitializer> initializers = globalConfig.serialization().contextInitializers();
if (initializers == null || initializers.isEmpty()) {
// If no SCIs have been explicitly configured, then load all available SCI services
initializers = ServiceFinder.load(SerializationContextInitializer.class, globalConfig.classLoader());
}
initializers.forEach(user::addContextInitializer);
String messageName = PersistenceContextInitializer.getFqTypeName(MarshallableUserObject.class);
BaseMarshaller userObjectMarshaller = new MarshallableUserObject.Marshaller(messageName, userMarshaller.wired());
update(GLOBAL, ctx -> ctx.addContextInitializer(new PersistenceContextInitializerImpl()).addContextInitializer(new org.infinispan.commons.GlobalContextInitializerImpl()).addMarshaller(userObjectMarshaller));
update(PERSISTENCE, ctx -> ctx.addContextInitializer(new PersistenceContextInitializerImpl()).addMarshaller(userObjectMarshaller));
}
Aggregations