[id='jgroups_getting_started-{context}']
= Getting Started with Default Stacks
Use default JGroups stacks with recommended settings as a starting point for
your cluster transport layer.

.Declaratively

* Specify default JGroups stacks with the `stack` attribute.
+
[source,xml,options="nowrap",subs=attributes+]
----
include::config_examples/config_transport_stack.xml[]
----
<1> uses the `default-jgroups-udp.xml` stack for cluster transport.

.Programmatically

* Specify default JGroups stacks with the `addProperty()` method.
+
[source,java]
----
include::code_examples/ConfigureTransportDefault.java[]
----
<1> uses the `default-jgroups-udp.xml` stack for cluster transport.

[TIP]
====
Use the `cluster-stack` argument with the {brandname} server startup script.

[source,options="nowrap",subs=attributes+]
----
$ bin/server.sh --cluster-stack=tcp
----
====
