5 Replies Latest reply on Nov 18, 2013 9:22 AM by Randall Hauch

    Having a problem with the Modeshape v3.6.0 configuration in domain mode with JBoss EAP v6.1.X

    Willie Chieukam Newbie

      I am currently working on JBoss EAP version 6.1.X and modeshape version 3.6.

       

      What i am trying to achieve is the following:

       

      I am starting JBoss in domain mode with 5 nodes. Each with its own local cache. Important to mention here is that i don't want the local caches of the nodes to sync among each other. That means if i do some changes in one node, the changes should not be automatically replicated to the other nodes. Also the contents are stored in a database.

       

      So what i would like to achieve is to configure the local caches so that they expire after a given period of time and then the caches will be builded again with the update data from the database.

       

      Below my configuration.

       

      Any idea what i am doing wrong here or if i missed something essential?

       

       

      Best Regards,

       

      Willie

       

      <?xml version='1.0' encoding='UTF-8'?>
      
      <domain xmlns="urn:jboss:domain:1.3">
      
          <extensions>
              <extension module="org.jboss.as.clustering.infinispan"/>
              <extension module="org.jboss.as.clustering.jgroups"/>
              <extension module="org.jboss.as.cmp"/>
              <extension module="org.jboss.as.configadmin"/>
              <extension module="org.jboss.as.connector"/>
              <extension module="org.jboss.as.ee"/>
              <extension module="org.jboss.as.ejb3"/>
              <extension module="org.jboss.as.jacorb"/>
              <extension module="org.jboss.as.jaxr"/>
              <extension module="org.jboss.as.jaxrs"/>
              <extension module="org.jboss.as.jdr"/>
              <extension module="org.jboss.as.jmx"/>
              <extension module="org.jboss.as.jpa"/>
              <extension module="org.jboss.as.jsr77"/>
              <extension module="org.jboss.as.logging"/>
              <extension module="org.jboss.as.mail"/>
              <extension module="org.jboss.as.messaging"/>
              <extension module="org.jboss.as.modcluster"/>
              <extension module="org.jboss.as.naming"/>
              <extension module="org.jboss.as.osgi"/>
              <extension module="org.jboss.as.pojo"/>
              <extension module="org.jboss.as.remoting"/>
              <extension module="org.jboss.as.sar"/>
              <extension module="org.jboss.as.security"/>
              <extension module="org.jboss.as.threads"/>
              <extension module="org.jboss.as.transactions"/>
              <extension module="org.jboss.as.web"/>
              <extension module="org.jboss.as.webservices"/>
              <extension module="org.jboss.as.weld"/>
             
              <!-- Add the ModeShape subsystem (JCR) -->
              <extension module="org.modeshape"/>
          </extensions>
      
          <profiles>
              <profile name="full">
                  <!-- add modeshape repository -->
               <subsystem xmlns="urn:jboss:domain:modeshape:1.0">
                      <repository name="artifacts">
                          <workspaces allow-workspace-creation="false" default-workspace="default">
                              <workspace name="default">
                                  <initial-content>
                                      initial-content-default.xml
                                  </initial-content>
                              </workspace>
                              <workspace name="workspace2"/>
                              <workspace name="workspace3"/>
                          </workspaces>
                          <indexing rebuild-upon-startup="always"/> 
                          <sequencers>
                              <sequencer name="fixed-width-text-sequencer" classname="org.modeshape.sequencer.text.FixedWidthTextSequencer" module="org.modeshape.sequencer.text" commentMarker="#" path-expression="/files(//*.txt[*])/jcr:content[@jcr:data] => /derived/text/fixedWidth/$1"/>
                              <sequencer name="xml-sequencer" classname="xml" module="org.modeshape.sequencer.xml" path-expression="/files(//)*.xml[*]/jcr:content[@jcr:data] => /derived/xml/$1"/>
                              <sequencer name="image-sequencer" classname="image" module="org.modeshape.sequencer.image" path-expression="/files(//*.(png|jpg|gif)[*])/jcr:content[@jcr:data] => /derived/image/$1"/>
                          </sequencers>
                          <text-extractors>
                              <text-extractor name="tika-extractor" classname="tika" module="org.modeshape.extractor.tika"/>
                          </text-extractors>
                      </repository>               
                      <webapp name="modeshape-rest.war"/>
                      <webapp name="modeshape-webdav.war"/>
                      <!-- <webapp name="modeshape-explorer.war"/>  -->
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:logging:1.1">
                      <logger category="com.arjuna">
                          <level name="WARN"/>
                      </logger>
                      <logger category="org.apache.tomcat.util.modeler">
                          <level name="WARN"/>
                      </logger>
                      <logger category="sun.rmi">
                          <level name="WARN"/>
                      </logger>
                      <logger category="jacorb">
                          <level name="WARN"/>
                      </logger>
                      <logger category="jacorb.config">
                          <level name="ERROR"/>
                      </logger>
                      <logger category="org.hibernate">
                          <level name="ERROR"/>
                      </logger>
                      <logger category="org.jboss.as.server.deployment">
                          <level name="ERROR"/>
                      </logger>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:cmp:1.0"/>
                  <subsystem xmlns="urn:jboss:domain:configadmin:1.0"/>
                  <subsystem xmlns="urn:jboss:domain:datasources:1.1">
                      <datasources>
                          <datasource jndi-name="XXXXX" pool-name="XXXXX" enabled="true">
                              <connection-url>XXXXX</connection-url>
                              <driver>oracle</driver>
                              <transaction-isolation>XXXXX</transaction-isolation>
                              <pool>
                                  <min-pool-size>XXXXX</min-pool-size>
                                  <max-pool-size>XXXXX</max-pool-size>
                                  <prefill>XXXXX</prefill>
                              </pool>
                              <security>
                                  <user-name>XXXXX</user-name>
                                  <password>XXXXX</password>
                              </security>
                             
                              <validation>
                                  <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
                                  <validate-on-match>true</validate-on-match>
                              </validation>
                          </datasource>
                          <drivers>
                              <driver name="oracle" module="XXXXX">
                                  <xa-datasource-class>oracle.jdbc.OracleDriver</xa-datasource-class>
                              </driver>
                          </drivers>
                      </datasources>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:ee:1.1">
                      <spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
                      <jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:ejb3:1.3">
                      <session-bean>
                          <stateless>
                              <bean-instance-pool-ref pool-name="slsb-strict-max-pool"/>
      
                          </stateless>
                          <stateful default-access-timeout="5000" cache-ref="simple"/>
                          <singleton default-access-timeout="5000"/>
                      </session-bean>
                      <mdb>
                          <resource-adapter-ref resource-adapter-name="hornetq-ra"/>
                          <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
                      </mdb>
                      <pools>
                          <bean-instance-pools>
                              <strict-max-pool name="slsb-strict-max-pool" max-pool-size="50" instance-acquisition-timeout="30" instance-acquisition-timeout-unit="SECONDS"/>
                              <strict-max-pool name="mdb-strict-max-pool" max-pool-size="50" instance-acquisition-timeout="30" instance-acquisition-timeout-unit="SECONDS"/>
                              <strict-max-pool name="printing-pool" max-pool-size="10" instance-acquisition-timeout="30" instance-acquisition-timeout-unit="SECONDS"/>
                          </bean-instance-pools>
                      </pools>
                      <caches>
                          <cache name="simple" aliases="NoPassivationCache"/>
                          <cache name="passivating" passivation-store-ref="file" aliases="SimpleStatefulCache"/>
                      </caches>
                      <passivation-stores>
                          <file-passivation-store name="file"/>
                      </passivation-stores>
                      <async thread-pool-name="async-thread-pool"/>
                      <timer-service thread-pool-name="default">
                          <data-store path="timer-service-data" relative-to="jboss.server.data.dir"/>
                      </timer-service>
                      <remote connector-ref="remoting-connector" thread-pool-name="default"/>
                      <thread-pools>
                          <thread-pool name="default">
                              <max-threads count="50"/>
                              <keepalive-time time="100" unit="milliseconds"/>
                          </thread-pool>
                          <thread-pool name="async-thread-pool">
                              <max-threads count="20"/>
                              <keepalive-time time="100" unit="milliseconds"/>
                          </thread-pool>
                      </thread-pools>
                      <iiop enable-by-default="false" use-qualified-name="false"/>
                      <default-distinct-name value="${server.distinct.name}"/>
      
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:infinispan:1.3">
                      <cache-container name="hibernate" default-cache="local-query" module="org.jboss.as.jpa.hibernate:4">
                          <local-cache name="entity">
                              <transaction mode="NON_XA"/>
                              <eviction strategy="LRU" max-entries="10000"/>
                              <expiration max-idle="100000"/>
                          </local-cache>
                          <local-cache name="local-query">
                              <transaction mode="NONE"/>
                              <eviction strategy="LRU" max-entries="10000"/>
                              <expiration max-idle="100000"/>
                          </local-cache>
                          <local-cache name="timestamps">
                              <transaction mode="NONE"/>
                              <eviction strategy="NONE"/>
                          </local-cache>
                      </cache-container>
                     
                       <cache-container name="modeshape" default-cache="artifacts" module="org.modeshape">                  
                          <local-cache name="artifacts">
                              <transaction mode="NON_XA"/>
                              <expiration max-idle="60000"/>
                              <mixed-keyed-jdbc-store datasource="XXXXX" passivation="false" purge="false">
                                  <property name="databaseType">
                                      oracle
                                  </property>
                                  <property name="createTableOnStart">
                                      true
                                  </property>
                                  <string-keyed-table prefix="CONTENT_REPO_STRING">
                                      <id-column name="id_column" type="VARCHAR2(255)"/>
                                      <data-column name="data_column" type="BLOB"/>
                                      <timestamp-column name="timestamp_column" type="NUMBER(20)"/>
                                  </string-keyed-table>
                                  <binary-keyed-table prefix="CONTENT_REPO_BINARY">
                                      <id-column name="id_column" type="VARCHAR2(255)"/>
                                      <data-column name="data_column" type="BLOB"/>
                                      <timestamp-column name="timestamp_column" type="NUMBER(20)"/>
                                  </binary-keyed-table>
                              </mixed-keyed-jdbc-store>
                          </local-cache>
                      </cache-container>               
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:jacorb:1.2">
                      <orb socket-binding="jacorb" ssl-socket-binding="jacorb-ssl">
                          <initializers security="on" transactions="spec"/>
                      </orb>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:jaxr:1.1">
                      <connection-factory jndi-name="java:jboss/jaxr/ConnectionFactory"/>
                      <properties/>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:jaxrs:1.0"/>
                  <subsystem xmlns="urn:jboss:domain:jca:1.1">
                      <archive-validation enabled="true" fail-on-error="true" fail-on-warn="false"/>
                      <bean-validation enabled="true"/> <default-workmanager>
                          <short-running-threads>
                              <core-threads count="50"/>
                              <queue-length count="50"/>
                              <max-threads count="50"/>
                              <keepalive-time time="10" unit="seconds"/>
                          </short-running-threads>
                          <long-running-threads>
                              <core-threads count="50"/>
                              <queue-length count="50"/>
                              <max-threads count="50"/>
                              <keepalive-time time="10" unit="seconds"/>
                          </long-running-threads>
                      </default-workmanager>
                      <cached-connection-manager/>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:jdr:1.0"/>
                  <subsystem xmlns="urn:jboss:domain:jmx:1.1">
                      <show-model value="true"/>
                      <remoting-connector use-management-endpoint="false"/>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:jpa:1.0">
                      <jpa default-datasource=""/>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:jsr77:1.0"/>
                  <subsystem xmlns="urn:jboss:domain:mail:1.0">
                      <mail-session jndi-name="java:jboss/mail/Default">
                          <smtp-server outbound-socket-binding-ref="mail-smtp"/>
                      </mail-session>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:messaging:1.2">
                      <hornetq-server>
                          <persistence-enabled>true</persistence-enabled>
                          <journal-file-size>102400</journal-file-size>
                          <journal-min-files>2</journal-min-files>
      
                          <connectors>
                              <netty-connector name="netty" socket-binding="messaging"/>
                              <netty-connector name="netty-throughput" socket-binding="messaging-throughput">
                                  <param key="batch-delay" value="50"/>
                              </netty-connector>
                              <in-vm-connector name="in-vm" server-id="0"/>
                          </connectors>
      
                          <acceptors>
                              <netty-acceptor name="netty" socket-binding="messaging"/>
                              <netty-acceptor name="netty-throughput" socket-binding="messaging-throughput">
                                  <param key="batch-delay" value="50"/>
                                  <param key="direct-deliver" value="false"/>
                              </netty-acceptor>
                              <in-vm-acceptor name="in-vm" server-id="0"/>
                          </acceptors>
      
                          <security-settings>
                              <security-setting match="#">
                                  <permission type="send" roles="guest"/>
                                  <permission type="consume" roles="guest"/>
                                  <permission type="createNonDurableQueue" roles="guest"/>
                                  <permission type="deleteNonDurableQueue" roles="guest"/>
                              </security-setting>
                          </security-settings>
      
                          <address-settings>
                              <address-setting match="#">
                                  <dead-letter-address>jms.queue.DLQ</dead-letter-address>
                                  <expiry-address>jms.queue.ExpiryQueue</expiry-address>
                                  <redelivery-delay>0</redelivery-delay>
                                  <max-size-bytes>10485760</max-size-bytes>
                                  <address-full-policy>BLOCK</address-full-policy>
                                  <message-counter-history-day-limit>10</message-counter-history-day-limit>
                              </address-setting>
                          </address-settings>
      
                          <jms-connection-factories>
                              <connection-factory name="InVmConnectionFactory">
                                  <connectors>
                                      <connector-ref connector-name="in-vm"/>
                                  </connectors>
                                  <entries>
                                      <entry name="java:/ConnectionFactory"/>
                                  </entries>
                              </connection-factory>
                              <connection-factory name="RemoteConnectionFactory">
                                  <connectors>
                                      <connector-ref connector-name="netty"/>
                                  </connectors>
                                  <entries>
                                      <entry name="java:jboss/exported/jms/RemoteConnectionFactory"/>
                                  </entries>
                              </connection-factory>
                              <connection-factory name="SpeedConnectionFactory">
                                  <connectors>
                                      <connector-ref connector-name="in-vm"/>
                                  </connectors>
                                  <entries>
                                      <entry name="speed/JmsConnectionFactory"/>
                                      <entry name="java:jboss/speed/JmsConnectionFactory"/>
                                  </entries>
                              </connection-factory>
                              <pooled-connection-factory name="hornetq-ra">
                                  <transaction mode="xa"/>
                                  <connectors>
                                      <connector-ref connector-name="in-vm"/>
                                  </connectors>
                                  <entries>
                                      <entry name="java:/JmsXA"/>
                                  </entries>
                              </pooled-connection-factory>
                          </jms-connection-factories>
      
                          <jms-destinations>
                              <jms-queue name="SpeedRequestQueue">
                                  <entry name="speed/queue/request_queue"/>
                                  <entry name="java:jboss/speed/queue/request_queue"/>
                              </jms-queue>
                              <jms-queue name="SpeedResponseQueue">
                                  <entry name="speed/queue/response_queue"/>
                                  <entry name="java:jboss/speed/queue/response_queue"/>
                              </jms-queue>
                          </jms-destinations>
                      </hornetq-server>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:naming:1.2">
                      <remote-naming/>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">
                      <properties>
                          <property name="org.osgi.framework.startlevel.beginning">
                              1
                          </property>
                      </properties>
                      <capabilities>
                          <capability name="javax.servlet.api:v25"/>
                          <capability name="javax.transaction.api"/>
                          <capability name="org.apache.felix.log" startlevel="1"/>
                          <capability name="org.jboss.osgi.logging" startlevel="1"/>
                          <capability name="org.apache.felix.configadmin" startlevel="1"/>
                          <capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>
                      </capabilities>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:pojo:1.0"/>
                  <subsystem xmlns="urn:jboss:domain:remoting:1.1">
                      <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
                      <outbound-connections>
                          <remote-outbound-connection name="XXXXXXX-server" outbound-socket-binding-ref="remote-XXXXXXX-server" username="ejbremote" security-realm="EJBRealm">
                              <properties>
                                  <property name="SASL_POLICY_NOANONYMOUS" value="false"/>
                                  <property name="SSL_ENABLED" value="false"/>
                              </properties>
                          </remote-outbound-connection>
                          <remote-outbound-connection name="XXXXXXXexternal-server" outbound-socket-binding-ref="remote-XXXXXXXexternal-server" username="ejbremote" security-realm="EJBRealm">
                              <properties>
                                  <property name="SASL_POLICY_NOANONYMOUS" value="false"/>
                                  <property name="SSL_ENABLED" value="false"/>
                              </properties>
                          </remote-outbound-connection>
                          <remote-outbound-connection name="XXXXXXXnativecode-server" outbound-socket-binding-ref="remote-XXXXXXXnativecode-server" username="ejbremote" security-realm="EJBRealm">
                              <properties>
                                  <property name="SASL_POLICY_NOANONYMOUS" value="false"/>
                                  <property name="SSL_ENABLED" value="false"/>
                              </properties>
                          </remote-outbound-connection>
                      </outbound-connections>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"/>
                  <subsystem xmlns="urn:jboss:domain:sar:1.0"/>
                  <subsystem xmlns="urn:jboss:domain:security:1.2">
                      <security-domains>
                          <security-domain name="LDAP">
                              <authentication>
                                  <login-module code="org.jboss.security.auth.spi.LdapExtLoginModule" flag="required">
                                      <module-option name="java.naming.factory.initial" value="com.sun.jndi.ldap.LdapCtxFactory"/>
                                      <module-option name="java.naming.provider.url" value="XXXXXXXXXXXXXX"/>
                                      <module-option name="bindDN" value="XXXXXX\hdbnet"/>
                                      <module-option name="bindCredential" value="Xd34sam8!"/>
                                      <module-option name="baseCtxDN" value="dc=XXXXXX,dc=de"/>
                                      <module-option name="baseFilter" value="(sAMAccountName={0})"/>
                                      <module-option name="rolesCtxDN" value="OU=Sicherheits-Gruppen,DC=XXXXXX,DC=de"/>
                                      <module-option name="roleFilter" value="(member={1})"/>
                                      <module-option name="roleAttributeID" value="memberOf"/>
                                      <module-option name="roleNameAttributeID" value="cn"/>
                                      <module-option name="roleAttributeIsDN" value="true"/>
                                      <module-option name="allowEmptyPasswords" value="false"/>
                                      <module-option name="Context.REFERRAL" value="follow"/>
                                      <module-option name="throwValidateError" value="true"/>
                                  </login-module>
                                  <login-module code="org.jboss.security.auth.spi.RoleMappingLoginModule" flag="optional">
                                      <module-option name="rolesProperties" value="XXXXXXXXXXXXX/role-mapping-test.properties"/>
                                      <module-option name="replaceRole" value="false"/>
                                  </login-module>
                              </authentication>
                          </security-domain>
                          <security-domain name="other" cache-type="default">
                              <authentication>
                                  <login-module code="Remoting" flag="optional">
                                      <module-option name="password-stacking" value="useFirstPass"/>
                                  </login-module>
                                  <login-module code="RealmDirect" flag="required">
                                      <module-option name="password-stacking" value="useFirstPass"/>
                                  </login-module>
                              </authentication>
                          </security-domain>
                          <security-domain name="jboss-web-policy" cache-type="default">
                              <authorization>
                                  <policy-module code="Delegating" flag="required"/>
                              </authorization>
                          </security-domain>
                          <security-domain name="jboss-ejb-policy" cache-type="default">
                              <authorization>
                                  <policy-module code="Delegating" flag="required"/>
                              </authorization>
                          </security-domain>
                          <security-domain name="modeshape-security" cache-type="default">
                          <authentication>
                              <login-module code="UsersRoles" flag="required">
                                  <module-option name="usersProperties" value="XXXXX/modeshape-users.properties"/>
                                  <module-option name="rolesProperties" value="XXXXX/modeshape-roles.properties"/>
                              </login-module>
                          </authentication>
                      </security-domain>
                          <security-domain name="basic">
                              <authentication>
                                  <login-module code="UsersRoles" flag="required">
                                      <module-option name="usersProperties" value="XXXXX/application-users.properties"/>
                                      <module-option name="rolesProperties" value="XXXXX/application-roles.properties"/>
                                      <module-option name="hashAlgorithm" value="MD5"/>
                                      <module-option name="hashEncoding" value="base64"/>
                                  </login-module>
                              </authentication>
                          </security-domain>
                      </security-domains>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:threads:1.1"/>
                  <subsystem xmlns="urn:jboss:domain:transactions:1.2">
                      <core-environment>
                          <process-id>
                              <uuid/>
                          </process-id>
                      </core-environment>
                      <recovery-environment socket-binding="txn-recovery-environment" status-socket-binding="txn-status-manager"/>
                      <coordinator-environment default-timeout="90"/>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false">
                      <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
                      <connector name="ajp13" protocol="AJP/1.3" scheme="ajp" socket-binding="ajp"/>
                      <virtual-server name="default-host" enable-welcome-root="false">
                          <alias name="localhost"/>
                          <alias name="example.com"/>
                      </virtual-server>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:webservices:1.1">
                      <modify-wsdl-address>true</modify-wsdl-address>
                      <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
                      <endpoint-config name="Standard-Endpoint-Config"/>
                      <endpoint-config name="Recording-Endpoint-Config">
                          <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
                              <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
                          </pre-handler-chain>
                      </endpoint-config>
                  </subsystem>
                  <subsystem xmlns="urn:jboss:domain:weld:1.0"/>
              </profile>
          </profiles>
      
          <interfaces>
              <interface name="management"/>
              <interface name="public"/>
              <interface name="unsecure"/>
          </interfaces>
      
          <socket-binding-groups>
              <socket-binding-group name="standard-sockets" default-interface="public">
                  <socket-binding name="ajp" port="8009"/>
                  <socket-binding name="http" port="8080"/>
                  <socket-binding name="https" port="8443"/>
                  <socket-binding name="osgi-http" interface="management" port="8090"/>
                  <socket-binding name="remoting" port="8001"/>
                  <socket-binding name="txn-recovery-environment" port="4712"/>
                  <socket-binding name="txn-status-manager" port="4713"/>
                  <outbound-socket-binding name="mail-smtp">
                      <remote-destination host="XXXXXXXXXX" port="25"/>
                  </outbound-socket-binding>
              </socket-binding-group>
              <socket-binding-group name="ha-sockets" default-interface="public">
                  <socket-binding name="ajp" port="8009"/>
                  <socket-binding name="http" port="8080"/>
                  <socket-binding name="https" port="8443"/>
                  <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
                  <socket-binding name="jgroups-tcp" port="7600"/>
                  <socket-binding name="jgroups-tcp-fd" port="57600"/>
                  <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
                  <socket-binding name="jgroups-udp-fd" port="54200"/>
                  <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
                  <socket-binding name="osgi-http" interface="management" port="8090"/>
                  <socket-binding name="remoting" port="8001"/>
                  <socket-binding name="txn-recovery-environment" port="4712"/>
                  <socket-binding name="txn-status-manager" port="4713"/>
                  <outbound-socket-binding name="mail-smtp">
                      <remote-destination host="XXXXXX" port="25"/>
                  </outbound-socket-binding>
              </socket-binding-group>
              <socket-binding-group name="full-sockets" default-interface="public">
                  <socket-binding name="ajp" port="8009"/>
                  <socket-binding name="http" port="8001"/>
                  <socket-binding name="https" port="8443"/>
                  <socket-binding name="jacorb" interface="unsecure" port="3528"/>
                  <socket-binding name="jacorb-ssl" interface="unsecure" port="3529"/>
                  <socket-binding name="messaging" port="5445"/>
                  <socket-binding name="messaging-group" port="0" multicast-address="${jboss.messaging.group.address:231.7.7.7}" multicast-port="${jboss.messaging.group.port:9876}"/>
                  <socket-binding name="messaging-throughput" port="5455"/>
                  <socket-binding name="osgi-http" interface="management" port="8090"/>
                  <socket-binding name="remoting" port="4447" />
                  <socket-binding name="txn-recovery-environment" port="4712"/>
                  <socket-binding name="txn-status-manager" port="4713"/>
                  <outbound-socket-binding name="mail-smtp">
                      <remote-destination host="localhost" port="25"/>
                  </outbound-socket-binding>
              </socket-binding-group>
              <socket-binding-group name="full-sockets-ejb-client" default-interface="public">
                  <socket-binding name="ajp" port="8009"/>
                  <socket-binding name="http" port="8001"/>
                  <socket-binding name="https" port="8443"/>
                  <socket-binding name="jacorb" interface="unsecure" port="3528"/>
                  <socket-binding name="jacorb-ssl" interface="unsecure" port="3529"/>
                  <socket-binding name="messaging" port="5445"/>
                  <socket-binding name="messaging-group" port="0" multicast-address="${jboss.messaging.group.address:231.7.7.7}" multicast-port="${jboss.messaging.group.port:9876}"/>
                  <socket-binding name="messaging-throughput" port="5455"/>
                  <socket-binding name="osgi-http" interface="management" port="8090"/>
                  <socket-binding name="remoting" port="4447"/>
                  <socket-binding name="txn-recovery-environment" port="4712"/>
                  <socket-binding name="txn-status-manager" port="4713"/>
                  <outbound-socket-binding name="mail-smtp">
                      <remote-destination host="XXXXXX" port="25"/>
                  </outbound-socket-binding>
                  <outbound-socket-binding name="remote-XXXXXXX-server">
                      <remote-destination host="127.0.0.1" port="4447"/>
                  </outbound-socket-binding>
                  <outbound-socket-binding name="remote-XXXXXXXexternal-server">
                      <remote-destination host="127.0.0.1" port="4497"/>
                  </outbound-socket-binding>
                  <outbound-socket-binding name="remote-XXXXXXXnativecode-server">
                      <remote-destination host="127.0.0.1" port="4517"/>
                  </outbound-socket-binding>
              </socket-binding-group>
              <socket-binding-group name="full-ha-sockets" default-interface="public">
                  <socket-binding name="ajp" port="8009"/>
                  <socket-binding name="http" port="8080"/>
                  <socket-binding name="https" port="8443"/>
                  <socket-binding name="jacorb" interface="unsecure" port="3528"/>
                  <socket-binding name="jacorb-ssl" interface="unsecure" port="3529"/>
                  <socket-binding name="jgroups-mping" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
                  <socket-binding name="jgroups-tcp" port="7600"/>
                  <socket-binding name="jgroups-tcp-fd" port="57600"/>
                  <socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
                  <socket-binding name="jgroups-udp-fd" port="54200"/>
                  <socket-binding name="messaging" port="5445"/>
                  <socket-binding name="messaging-group" port="0" multicast-address="${jboss.messaging.group.address:231.7.7.7}" multicast-port="${jboss.messaging.group.port:9876}"/>
                  <socket-binding name="messaging-throughput" port="5455"/>
                  <socket-binding name="modcluster" port="0" multicast-address="224.0.1.105" multicast-port="23364"/>
                  <socket-binding name="osgi-http" interface="management" port="8090"/>
                  <socket-binding name="remoting" port="8001"/>
                  <socket-binding name="txn-recovery-environment" port="4712"/>
                  <socket-binding name="txn-status-manager" port="4713"/>
                  <outbound-socket-binding name="mail-smtp">
                      <remote-destination host="XXXXX" port="25"/>
                  </outbound-socket-binding>
              </socket-binding-group>
          </socket-binding-groups>
      
          <server-groups>
              <server-group name="XXXXXXX-server-group" profile="full">
                  <jvm name="default">
                      <heap size="1972m" max-size="1972m"/>
                      <permgen max-size="768m"/>
                  </jvm>
                  <system-properties>
                      <property name="server.distinct.name" value="XXXXX"/>
                  </system-properties>
                  <socket-binding-group ref="full-sockets-ejb-client"/>
              </server-group>
              <server-group name="XXXXXXXweb-server-group" profile="full">
                  <jvm name="default">
                      <heap size="900m" max-size="1281m"/>
                      <permgen max-size="768m"/>
                  </jvm>
                  <socket-binding-group ref="full-sockets-ejb-client"/>
                  <system-properties>
                      <property name="server.distinct.name" value="XXXXX"/>
                  </system-properties>
              </server-group>
              <server-group name="XXXXXXXng-server-group" profile="full">
                  <jvm name="default">
                      <heap size="900m" max-size="1281m"/>
                      <permgen max-size="768m"/>
                  </jvm>
                  <socket-binding-group ref="full-sockets-ejb-client"/>
                  <system-properties>
                      <property name="server.distinct.name" value="XXXXX"/>
                  </system-properties>
              </server-group>
              <server-group name="XXXXXXXexternal-server-group" profile="full">
                  <jvm name="default">
                      <heap size="1281m" max-size="1281m"/>
                      <permgen max-size="768m"/>
                  </jvm>
                  <socket-binding-group ref="full-sockets-ejb-client"/>
                  <system-properties>
                      <property name="server.distinct.name" value="XXXXX"/>
                  </system-properties>
              </server-group>
              <server-group name="XXXXX" profile="full">
                 <jvm name="default">
                     <heap size="256m" max-size="512m"/>
                     <permgen max-size="768m"/>
                 </jvm>
                 <socket-binding-group ref="full-sockets-ejb-client"/>
                 <system-properties>
                     <property name="server.distinct.name" value="XXXXX"/>
                 </system-properties>
             </server-group>
          </server-groups>
      
      </domain>
      
      
        • 1. Re: Having a problem with the Modeshape v3.6.0 configuration in domain mode with JBoss EAP v6.1.X
          Randall Hauch Master

          You might want to add a "shared" attribute with value "true" to the "mixed-keyed-jdbc-store" element. This signifies to each of your local Infinispan caches that they are not the only reader/writer to the store.

           

          Also, you're using expiration, which means the nodes in the repository actually "expire" and thus are not valid and after a certain amount of time will be removed from storage. This is NOT what you want. Instead, you want to use eviction. So replace your "expiration" XML element with:

           

          <eviction strategy="LIRS" maxEntries="10000" />

           

          of course using an appropriate value for the maximum number of entries you want in-memory inside each local Infinispan cache. Remember that ModeShape has its own internal workspace cache of Java object representations of the nodes (rather than the JSON-like representations stored in the Infinispan cache and the cache store). These workspace caches also uses eviction (and can be customized), so be sure to take that into consideration when sizing the maxEntries in your local Infinispan cache.

           

          UPDATE: I'm also not sure why you've chosen to use "mixed-keyed-jdbc-store" rather than "string-keyed-jdbc-store". Using the latter should be functionally equivalent (since ModeShape only stores values with string keys) while more efficient (since no decision has to be made). Note the "string-keyed-jdbc-store" doesn't have the "binary-keyed-table" element; otherwise, it's very similar to "mixed-keyed-jdbc-store".

          • 2. Re: Having a problem with the Modeshape v3.6.0 configuration in domain mode with JBoss EAP v6.1.X
            Willie Chieukam Newbie

            Hello Randall,

             

            thanks for the quick reply.

             

            1. Eviction

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

            I also found some Informations here (http://infinispan.org/docs/5.3.x/user_guide/user_guide.html#_eviction) about the eviction and expiration topics.

             

            When using eviction if the maxEntries is not reached that means that the store (here DB) will therefore not be updated with the data from the cache. I am right?

             

            Is there an easy way to configure infinispan and modeshape such that every change or new information added to the JCR on a server node is directly updated also in the DB?

             

            If yes how?

             

            what exactly does the "SHARE" attribute produce except signifing to each of the local Infinispan caches that they are not the only reader/writer to the store? I didn't found anything here

             

            2. JDBC Store Config

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

            I am actually not an infinispan expert ( :-) ) but i've chosen the "mixed-keyed-jdbc-store" because the data i am planning are css-, images and properties-files.

            thanks for the hint i will change it and see what will happen.

             

            3. Modeshape internal workspace cache

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

            What is actually the big additional value when using this?

             

            Thanks in advance for the time and help,

             

            Willie

            • 3. Re: Having a problem with the Modeshape v3.6.0 configuration in domain mode with JBoss EAP v6.1.X
              Randall Hauch Master

              1. Eviction

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

              I also found some Informations here (http://infinispan.org/docs/5.3.x/user_guide/user_guide.html#_eviction) about the eviction and expiration topics.

               

              When using eviction if the maxEntries is not reached that means that the store (here DB) will therefore not be updated with the data from the cache. I am right?

               

              You CAN use eviction and should NOT use eviction. Eviction does help reduce memory when Infinispan is used as a typical cache, but is very bad if using Infinispan as a store like how ModeShape does. But what you're talking about (storing data in memory and only persisting it in the store once memory is "full") is actually passivation, and you do NOT want to use passivation or eviction with ModeShape.

               

              Is there an easy way to configure infinispan and modeshape such that every change or new information added to the JCR on a server node is directly updated also in the DB?

               

              If yes how?

              Simply configure an Infinispan cache with a cache store (or loader; two terms for basically the same thing), and set up eviction. That way, whenever ModeShape saves changes to the repository (and thus changes into the Infinispan cache), the changes are always written to the store.

               

              Note that you're actually pretty close; just use eviction and not expiration or passivation.

               

              2. JDBC Store Config

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

              I am actually not an infinispan expert ( :-) ) but i've chosen the "mixed-keyed-jdbc-store" because the data i am planning are css-, images and properties-files.

              thanks for the hint i will change it and see what will happen.

               

              Are you going to store these inside the ModeShape repository? If so, only ModeShape will place anything in the Infinispan cache, and these will always have string-based keys. (Note that the binary-keyed-jdbc-store is for keys that are not strings, and it has nothing to do with what kind of values you are storing.)

               

              Also, if you're storing such files in ModeShape, please consider a binary store. See our documentation for why.

               

              Finally, please do not have your client application directly access the same Infinispan caches used by ModeShape. Doing so may result in your application overwriting some of the entries that ModeShape stores inside the Infinispan caches, thereby corrupting your repository.

               

              3. Modeshape internal workspace cache

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

              What is actually the big additional value when using this?

              The workspace cache is an in-memory, limited-size cache (in the normal sense of the word) of "node" objects that are ready for direct use by one or more Sessions. Recently used "node" objects are kept in this cache, making it very fast for sessions to use them. (Actually, the LIRS algorithm is an improvement over LRU, so strictly speaking it is not "most recently used".) This is similar to a second-level cache in Hibernate, and it is the most important cache in ModeShape because it keeps the objects that are closest in form to the JCR nodes exposed by Sessions. If a node can be found in the workspace cache, there is almost no overhead to simply using it.

               

              When ModeShape fails to find a node in the workspace cache, it must be materialized from what is stored inside the repository's Infinispan cache and converted into an object representation. This takes extra work, especially when the Infinispan cache doesn't have that entry in memory (since it must first be read from the cache store).

               

              Therefore, having both a workspace cache and a larger number of maxEntries in your local Infinispan cache just ends up storing the same data twice: an "node" form in the workspace cache and in "document" form in the local cache. The workspace cache is required (or at least highly recommended), so I would favor tweaking the workspace cache to be larger while leaving the maxEntries in the local cache to be relatively small.


              (For a variety of reasons, the data that ModeShape actually stores in the repository's Infinispan cache is a "document" that is serialized into a BSON formatted byte array in the cache store. This "document" form is great for persistence that is independent of Java serialization, but the downside is that it must be translated into a "node" object that ModeShape's JCR layer can work with. And that takes extra work.)

              • 4. Re: Having a problem with the Modeshape v3.6.0 configuration in domain mode with JBoss EAP v6.1.X
                Willie Chieukam Newbie

                How can I rebuild indexes programmatically when using modeshape?

                 

                I am still having the problem that if i make some changes i one JBoss server node to the content repository, in that node everything is fine and the shared db store is also updated but the other nodes (domain mode) can not see the changes because the indexes on those nodes are not updated / rebuilded?

                 

                any idea / recommendation how to solve this issue?

                 

                Best,

                • 5. Re: Having a problem with the Modeshape v3.6.0 configuration in domain mode with JBoss EAP v6.1.X
                  Randall Hauch Master

                  It sounds like ISPN may be properly clustered (since the data is accessible from any process), but that ModeShape may not be (since updating the indexes on all processes requires receiving events from the process on which the change was made). Your "repository" configuration above doesn't contain these attributes but should:

                   

                  cluster-name="modeshape-repository" cluster-stack="tcp"

                   

                  You'll probably also want to add a JGroups "stack" for your network. The default is okay, but you'll almost certainly want more control over it.

                   

                  See https://github.com/ModeShape/quickstart/blob/master/modeshape-clustering/standalone-modeshape-master.xml for an example of all this.