title: Infinispan: How to combine embedded cache and standalone server in one cluster?
body: <p>As a proof of concept, I try to build an infinispan cluster with an existing application which starts an embedded cache and one or more standalone infinispan servers.</p>
  
  <p>The reasosing behind this is, that I want to show, that there is a way of zero-configuration automatic creation of a cluster by simply starting freshly downloaded infinispan standalone servers. So my application runs an embedded cache which will be automatically "joined" by new nodes.</p>
  
  <p>I'm using the very default configuration for infinispan and jgroups (see below).</p>
  
  <p>The effect is, that two or more of my applications with embedded cache "see each other" and two or more standalone infinispan servers see each other. But none of my nodes "see" the standalone nodes and they don't see my nodes.</p>
  
  <p>I use infinispan 6.0.2.</p>
  
  <p>The standalone server is this: <a href="http://downloads.jboss.org/infinispan/6.0.2.Final/infinispan-server-6.0.2.Final-bin.zip" rel="nofollow">http://downloads.jboss.org/infinispan/6.0.2.Final/infinispan-server-6.0.2.Final-bin.zip</a></p>
  
  <p>Please give hints on what to check or links to ressources I could study to make this work.</p>
  
  <p>This is the code, that starts the embedded cache:</p>
  
  <pre><code>  DefaultCacheManager manager = new DefaultCacheManager(
      GlobalConfigurationBuilder.defaultClusteredBuilder().transport()
        .nodeName( node ).addProperty( "configurationFile", "jgroups.xml" )
        .build(), new ConfigurationBuilder().clustering()
        .cacheMode( CacheMode.DIST_SYNC ).build() );
  
    Cache&lt;String, String&gt; cache = manager.getCache( "default" );
  </code></pre>
  
  <p>This is the jgroups-config I'm using:</p>
  
  <pre><code>&lt;config xmlns="urn:org:jgroups"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="urn:org:jgroups file:schema/JGroups-3.2.xsd"&gt;
  
      &lt;UDP
              mcast_addr="${jgroups.udp.mcast_addr:228.6.7.8}"
              mcast_port="${jgroups.udp.mcast_port:46655}"
              tos="8"
              ucast_recv_buf_size="200k"
              ucast_send_buf_size="200k"
              mcast_recv_buf_size="200k"
              mcast_send_buf_size="200k"
              loopback="true"
              max_bundle_size="64000"
              max_bundle_timeout="30"
              ip_ttl="${jgroups.udp.ip_ttl:2}"
              enable_bundling="true"
              enable_diagnostics="false"
              bundler_type="old"
  
              thread_naming_pattern="pl"
  
              thread_pool.enabled="true"
              thread_pool.min_threads="2"
              thread_pool.max_threads="30"
              thread_pool.keep_alive_time="60000"
              thread_pool.queue_enabled="true"
              thread_pool.queue_max_size="100"
              thread_pool.rejection_policy="Discard"
  
              oob_thread_pool.enabled="true"
              oob_thread_pool.min_threads="2"
              oob_thread_pool.max_threads="30"
              oob_thread_pool.keep_alive_time="60000"
              oob_thread_pool.queue_enabled="false"
              oob_thread_pool.queue_max_size="100"
              oob_thread_pool.rejection_policy="Discard"
              /&gt;
  
      &lt;PING timeout="3000" num_initial_members="3"/&gt;
      &lt;MERGE2 max_interval="30000" min_interval="10000"/&gt;
      &lt;FD_SOCK/&gt;
      &lt;FD_ALL timeout="15000"/&gt;
      &lt;VERIFY_SUSPECT timeout="5000"/&gt;
      &lt;!-- Commented when upgraded to 3.1.0.Alpha (remove eventually)
      &lt;pbcast.NAKACK  exponential_backoff="0"
                      use_mcast_xmit="true"
                      retransmit_timeout="300,600,1200"
                      discard_delivered_msgs="true"/&gt; --&gt;
      &lt;pbcast.NAKACK2
              xmit_interval="1000"
              xmit_table_num_rows="100"
              xmit_table_msgs_per_row="10000"
              xmit_table_max_compaction_time="10000"
              max_msg_batch_size="100"/&gt;
  
      &lt;!-- Commented when upgraded to 3.1.0.Alpha (remove eventually)
      &lt;UNICAST timeout="300,600,1200"/&gt;  --&gt;
      &lt;UNICAST2
              stable_interval="5000"
              xmit_interval="500"
              max_bytes="1m"
              xmit_table_num_rows="20"
              xmit_table_msgs_per_row="10000"
              xmit_table_max_compaction_time="10000"
              max_msg_batch_size="100"
              conn_expiry_timeout="0"/&gt;
      &lt;pbcast.STABLE stability_delay="500" desired_avg_gossip="5000" max_bytes="1m"/&gt;
      &lt;pbcast.GMS print_local_addr="false" join_timeout="3000" view_bundling="true"/&gt;
      &lt;UFC max_credits="200k" min_threshold="0.20"/&gt;
      &lt;MFC max_credits="200k" min_threshold="0.20"/&gt;
      &lt;FRAG2 frag_size="8000"  /&gt;
      &lt;RSVP timeout="60000" resend_interval="500" ack_on_delivery="true" /&gt;
  &lt;/config&gt;
  </code></pre>