1 Reply Latest reply on Jan 12, 2013 2:05 AM by shineedbasheer

    How can we avoid jgroups.xml for configuring Infinispan Cluster?

      We are looking fro a way to configure the Transport Confiiguraion through programatically. Jchannel can be created programatically. But how this is associated with infinisapn configuration. Is it really possible to do like this. If yes, It will be very much thankfull, if anybody give some code snippet to demonstrate this.

        • 1. Re: How can we avoid jgroups.xml for configuring Infinispan Cluster?

          I go a solution for this

           

          Step 1: Created TransportConfigurationDataObject which internally holds all the attributes in jgroups.xml.

                              

                                             TransportConfigurationDO which has attibutes following DO attibutes

                                                               FdConfiguration dataGridFdConfigurationDO

                                                               FdSockConfiguration dataGridFdSockConfigurationDO

                                                               FragConfiguration dataGridFragConfigurationDO

                                                               MergeConfiguration dataGridMergeConfigurationDO

                                                               MfcConfiguration dataGridMfcConfigurationDO

                                                               PbCastGmsConfiguration dataGridPbCastGmsConfigurationDO

                                                               PbCastNakackConfiguration dataGridPbCastNakackConfigurationDO

                                                               PbCastStableConfiguration dataGridPbCastStableConfigurationDO        

                                                               RsvpConfiguration dataGridRsvpConfigurationDO

                                                              TcpConfiguration dataGridTcpConfigurationDO

                                                              TcpPingConfiguration dataGridTcpPingConfigurationDO

                                                              UfcConfiguration dataGridUfcConfigurationDO

                                                              UnicastConfiguration dataGridUnicastConfigurationDO

                                                              VerifySuspectConfiguration dataGridVerifySuspectConfigurationDO

           

           

           

          Step 2: Created class with logic to build transport xml string from above created DO

           

          Step 3: set this string to tansportConfigurationBuilder as follows

                          

                                  transportConfigurationBuilder.addProperty("configurationXml", xmlString);

           

                       NB: please note the key used, its not "configuration" its configurationXML

           

           

                        

          This apporached worked for me. Kindly update if you have better solution than this.