1 Reply Latest reply on Feb 16, 2017 4:51 AM by Anup Dey

    Remote access to cache memory of JBoss EAP 6.2

    Linder Poclaba Lazaro Newbie

      Hello community, I need your help, I have a JBoss EAP 6.2 server and I need to enter its cache memory remotely from another JBoss EAP 6.2 server, can you guide me how can I do it?

        • 1. Re: Remote access to cache memory of JBoss EAP 6.2
          Anup Dey Apprentice

          Hi,

           

          You need to use Red Hat Red Hat JBoss Data Grid.

           

          Red Hat JBoss Data Grid offers the following Cache Managers:

           

          1.EmbeddedCacheManager is a cache manager that runs within the Java Virtual Machine (JVM) used by the client. Currently, JBoss Data Grid offers only the DefaultCacheManager implementation of the EmbeddedCacheManager interface.

           

          2.RemoteCacheManager is used to access remote caches. When started, the RemoteCacheManager instantiates connections to the Hot Rod server (or multiple Hot Rod servers). It then manages the persistent TCP connections while it runs. As a result, RemoteCacheManager is resource-intensive. The recommended approach is to have a single RemoteCacheManager instance for each Java Virtual Machine (JVM)..

           

           

          Create a New RemoteCacheManager

          -----------------------------------------------------

           

          Use the following configuration to configure a new RemoteCacheManager:

           

          import org.infinispan.client.hotrod.configuration.Configuration;

          import org.infinispan.client.hotrod.configuration.ConfigurationBuilder;

           

          Configuration conf = new ConfigurationBuilder().addServer().host("localhost").port(11222).build();

          RemoteCacheManager manager = new RemoteCacheManager(conf);

          RemoteCache defaultCache = manager.getCache();

           

          Configuration Explanation:

           

          An explanation of each line of the provided configuration is as follows:

           

          1. Use the ConfigurationBuilder() method to configure a new builder. The .addServer()

          property adds a remote server, specified via the .host(<hostname|ip>) and

          .port(<port>) properties.

           

           

          Configuration conf = new

          ConfigurationBuilder().addServer().host(<hostname|ip>).port(<port>).build();

           

           

          2. Create a new RemoteCacheManager using the supplied configuration.

          RemoteCacheManager manager = new RemoteCacheManager(conf);

           

           

          3. Retrieve the default cache from the remote server.

          RemoteCache defaultCache = manager.getCache();

           

          See the below link:

          https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_Data_Grid/6.2/pdf/Administration_and_Configuration_Guide/Red…