[id='registering-sci-embedded-caches_{context}']
= Registering serialization context initializers
For embedded caches, {brandname} automatically registers serialization contexts and marshallers in your annotated `SerializationContextInitializer` implementation using the `java.util.ServiceLoader`.

If you prefer, you can disable automatic registration of `SerializationContextInitializer` implementations and then register them manually.

[IMPORTANT]
====
If you manually register one `SerializationContextInitializer` implementation, it disables automatic registration.
You must then manually register all other implementations.
====

.Procedure

. Set a value of `false` for the `ProtoSchema.service` annotation.
+
[source,java]
----
@ProtoSchema(
      includeClasses = SomeClass.class,
      ...
      service = false
)
----
+
. Manually register `SerializationContextInitializer` implementations either programmatically or declaratively, as in the following examples:

.Declarative
[source,xml,options="nowrap",subs=attributes+,role="primary"]
----
include::xml/protostream_marshaller.xml[]
----

.Programmatic
[source,java,options="nowrap",subs=attributes+,role="secondary"]
----
include::code_examples/ProtoStreamMarshaller.java[]
----
