RHDG programmatic cache creation in embedded mode for JGroups and cache configuration

Solution Verified - Updated -

Issue

  • How to create a clustered cache in a programmatic way if RHDG is used in embedded mode, there is no documentation or example?
  • Is it possible to create the JGroups and Infinispan configuration via programmatic API in embedded mode?
  • If JGroups configuration is created programmatically a NullPointerException is thrown
2019-03-14 11:52:45,148 WARN  [org.infinispan.example.EmbeddedCacheManager] (ServerService Thread Pool -- 191) null: java.lang.NullPointerException
    at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:891)
    at org.jgroups.protocols.FRAG2.up(FRAG2.java:163)
    at org.jgroups.protocols.FlowControl.up(FlowControl.java:338)
    at org.jgroups.protocols.pbcast.GMS.up(GMS.java:866)
    at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:233)
    at org.jgroups.stack.Protocol.up(Protocol.java:330)
    at org.jgroups.protocols.pbcast.NAKACK2.up(NAKACK2.java:591)
    at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:124)
    at org.jgroups.stack.Protocol.up(Protocol.java:330)
    at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:246)
    at org.jgroups.stack.Protocol.up(Protocol.java:330)
    at org.jgroups.protocols.Discovery.up(Discovery.java:263)
    at org.jgroups.stack.Protocol.up(Protocol.java:330)
    at org.jgroups.protocols.TP.init(TP.java:884)
    at org.jgroups.protocols.BasicTCP.init(BasicTCP.java:83)
    at org.jgroups.stack.ProtocolStack.initProtocolStack(ProtocolStack.java:840)
    at org.jgroups.stack.ProtocolStack.init(ProtocolStack.java:830)
    at org.infinispan.example.EmbeddedCacheManager.createGlobalConfiguration(EmbeddedCacheManager.java:103)
    at org.infinispan.example.EmbeddedCacheManager.getCacheManager(EmbeddedCacheManager.java:72)

Environment

  • Red Hat Data Grid (RHDG)
  • Red Hat JBoss Enterprise Application Platform (EAP)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content