ModeShape
  1. ModeShape
  2. MODE-1440

Improve AS7 subsystem configuration

    Details

    • Type: Task Task
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 3.0.0.Alpha2
    • Fix Version/s: 3.0.0.Alpha4
    • Component/s: Server
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      The ModeShape subsystem for AS7 has an initial XSD that doesn't quite fit what we want the structure to be. Also, the subsystem should be adapting this to the RepositoryConfiguration.

        Issue Links

          Activity

          Hide
          Randall Hauch
          added a comment -

          A proposal for the subsystem XML is below. Note that there are several places where one of several child elements would be allowed, and almost all of the attributes have default values.

            <subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="hibernate">
          
                <!-- ModeShape needs at least one cache per repository, and these can go in any
                     cache container. But we'll create one for our purposes. -->
                <cache-container name="modeshape" default-cache="sample">
                    <local-cache name="sample">
                        ...
                    </local-cache>
                </cache-container>
          
                ...
            </subsystem>
          
            <subsystem xmlns="urn:jboss:domain:modeshape:3.0" default-cache-container="modeshape">
                <!-- Multiple 'repository' elements are allowed -->
                <repository name="sample" 
                            cache-name="sample" cache-container="modeshape" 
                            jndi-name="jcr/local/sample"
                            enable-monitoring="true"
                            default-workspace="default" allow-workspace-creation="true"
                            security-domain="modeshape-security" 
                            anonymous-roles="readonly,readwrite,admin" anonymous-username="<anonymous>" use-anonymous-upon-failed-authentication="false">
                  <workspaces>
                    <!-- 0 or more workspaces can be predefined. At the moment, these are just names. 
                         But we may want to specify content or something else, so create element for each. -->
                    <workspace name="predefinedWorkspace1" />
                    <workspace name="predefinedWorkspace2" />
                    <workspace name="predefinedWorkspace3" />
                  </workspaces>
                  
                  <indexing thread-pool="modeshape-workers" batch-size="-1" reader-strategy="shared" mode="sync" async-thread-pool-size="1" async-max-queue-size="1" >
                    <analyzer classname="org.apache.lucene.analysis.standard.StandardAnalyzer" module="" />
          
                    <!-- 0 or more custom parameters are allowed, and these are prefixed with "hibernate.search." and passed directly to Hibernate Search -->
                    <parameter name="" value="" />
                    <parameter name="" value="" />
                    <parameter name="" value="" />
                    
                    <!-- choose one of the following (the first is the default)-->
                    <lucene-backend />
                    <jms-master-backend connection-factory-jndi-name="" queue-jndi-name=""/>
                    <jms-slave-backend connection-factory-jndi-name="" queue-jndi-name=""/>
                    <jgroups-master-backend channel-name=""/>
                    <jgroups-slave-backend channel-name=""/>
                    <blackhole-backend />
                    <custom-backend classname="" module="" custom-attribute="foo" />
                    
                  </indexing>
          
                  <!-- choose one of the following (the first is the default)-->
                  <file-index-storage rebuild-upon-startup="ifMissing"format="LUCENE_CURRENT"
                                      path="modeshape/sample/indexes" relative-to="jboss.server.data.dir"
                                      access-type="auto" locking-strategy="native"/>
                  <file-master-index-storage rebuild-upon-startup="ifMissing"  format="LUCENE_CURRENT"
                                      path="modeshape/sample/indexes" relative-to="jboss.server.data.dir"
                                      access-type="auto" locking-strategy="native" source-path="" source-relative-to="" refresh-in-seconds="3600"/>
                  <file-slave-index-storage rebuild-upon-startup="ifMissing"  format="LUCENE_CURRENT"
                                      path="modeshape/sample/indexes" relative-to="jboss.server.data.dir"
                                      access-type="auto" locking-strategy="native" source-path="" source-relative-to="" refresh-in-seconds="3600"
                                      copy-buffer-size-in-megabytes="16" retry-marker-lookup="0" retry-initialize-period-in-seconds="0"/>
                  <cache-index-storage rebuild-upon-startup="ifMissing" format="LUCENE_CURRENT"
                                      cache-container="modeshape" data-cache-name="sample-index-data" 
                                      lock-cache-name="sample-index-locks" metadata-cache-name="sample-index-metadata" 
                                      chunk-size-in-bytes=""/>
                  <ram-index-storage />
                  <custom-index-storage classname="" module="" description="" custom-attribute="foo" />
          
                  <!-- choose one of the following (the first is the default)-->
                  <file-binary-storage min-value-size="4096" path="modeshape/sample/binaries" relative-to="jboss.server.data.dir" />
                  <cache-binary-storage min-value-size="4096" cache-container="modeshape" cache-name="sample" />
                  <db-binary-storage min-value-size="4096" data-source="modeshape" />
          
                  <authenticators>
                    <!-- 0 or more custom authenticators -->
                    <authenticator name="" classname="" module="" description="" custom-attribute="foo" />
                    <authenticator name="" classname="" module="" />
                  </authenticators>
                  
                  <sequencers>
                    <!-- 0 or more sequencers -->
                    <sequencer name="" classname="" module="" path-expression="" custom-attribute="foo" />
                    <sequencer name="" classname="" module="" path-expression="" />
                  </sequencers>
          
                </repository>
            </subsystem>
          
          Show
          Randall Hauch
          added a comment - A proposal for the subsystem XML is below. Note that there are several places where one of several child elements would be allowed, and almost all of the attributes have default values. <subsystem xmlns= "urn:jboss:domain:infinispan:1.2" default-cache-container= "hibernate" > <!-- ModeShape needs at least one cache per repository, and these can go in any cache container. But we'll create one for our purposes. --> <cache-container name= "modeshape" default-cache= "sample" > <local-cache name= "sample" > ... </local-cache> </cache-container> ... </subsystem> <subsystem xmlns= "urn:jboss:domain:modeshape:3.0" default-cache-container= "modeshape" > <!-- Multiple 'repository' elements are allowed --> <repository name= "sample" cache-name= "sample" cache-container= "modeshape" jndi-name= "jcr/local/sample" enable-monitoring= "true" default-workspace= "default" allow-workspace-creation= "true" security-domain= "modeshape-security" anonymous-roles= "readonly,readwrite,admin" anonymous-username= " <anonymous> " use-anonymous-upon-failed-authentication= "false" > <workspaces> <!-- 0 or more workspaces can be predefined. At the moment, these are just names. But we may want to specify content or something else, so create element for each. --> <workspace name= "predefinedWorkspace1" /> <workspace name= "predefinedWorkspace2" /> <workspace name= "predefinedWorkspace3" /> </workspaces> <indexing thread-pool= "modeshape-workers" batch-size= "-1" reader-strategy= "shared" mode= "sync" async-thread-pool-size= "1" async-max-queue-size= "1" > <analyzer classname= "org.apache.lucene.analysis.standard.StandardAnalyzer" module="" /> <!-- 0 or more custom parameters are allowed, and these are prefixed with "hibernate.search." and passed directly to Hibernate Search --> <parameter name= "" value=" " /> <parameter name= "" value=" " /> <parameter name= "" value=" " /> <!-- choose one of the following (the first is the default)--> <lucene-backend /> <jms-master-backend connection-factory-jndi-name= "" queue-jndi-name=" "/> <jms-slave-backend connection-factory-jndi-name= "" queue-jndi-name=" "/> <jgroups-master-backend channel-name=""/> <jgroups-slave-backend channel-name=""/> <blackhole-backend /> <custom-backend classname= "" module=" " custom-attribute=" foo" /> </indexing> <!-- choose one of the following (the first is the default)--> <file-index-storage rebuild-upon-startup= "ifMissing" format= "LUCENE_CURRENT" path= "modeshape/sample/indexes" relative-to= "jboss.server.data.dir" access-type= "auto" locking-strategy= "native" /> <file-master-index-storage rebuild-upon-startup= "ifMissing" format= "LUCENE_CURRENT" path= "modeshape/sample/indexes" relative-to= "jboss.server.data.dir" access-type= "auto" locking-strategy= "native" source-path= "" source-relative-to=" " refresh-in-seconds=" 3600"/> <file-slave-index-storage rebuild-upon-startup= "ifMissing" format= "LUCENE_CURRENT" path= "modeshape/sample/indexes" relative-to= "jboss.server.data.dir" access-type= "auto" locking-strategy= "native" source-path= "" source-relative-to=" " refresh-in-seconds=" 3600" copy-buffer-size-in-megabytes= "16" retry-marker-lookup= "0" retry-initialize-period-in-seconds= "0" /> <cache-index-storage rebuild-upon-startup= "ifMissing" format= "LUCENE_CURRENT" cache-container= "modeshape" data-cache-name= "sample-index-data" lock-cache-name= "sample-index-locks" metadata-cache-name= "sample-index-metadata" chunk-size-in-bytes=""/> <ram-index-storage /> <custom-index-storage classname= "" module=" " description=" " custom-attribute=" foo" /> <!-- choose one of the following (the first is the default)--> <file-binary-storage min-value-size= "4096" path= "modeshape/sample/binaries" relative-to= "jboss.server.data.dir" /> <cache-binary-storage min-value-size= "4096" cache-container= "modeshape" cache-name= "sample" /> <db-binary-storage min-value-size= "4096" data-source= "modeshape" /> <authenticators> <!-- 0 or more custom authenticators --> <authenticator name= "" classname=" " module=" " description=" " custom-attribute=" foo" /> <authenticator name= "" classname=" " module=" " /> </authenticators> <sequencers> <!-- 0 or more sequencers --> <sequencer name= "" classname=" " module=" " path-expression=" " custom-attribute=" foo" /> <sequencer name= "" classname=" " module=" " path-expression=" " /> </sequencers> </repository> </subsystem>
          Hide
          Ted Jones
          added a comment -

          Looks much better Randall... and all elements with defaults (as indicated in the schema) are not required. Correct?

          Show
          Ted Jones
          added a comment - Looks much better Randall... and all elements with defaults (as indicated in the schema) are not required. Correct?
          Hide
          Randall Hauch
          added a comment -

          Correct, Ted. Almost everything has a default, and this will be reflected in the updated XSD. Some attributes are on an optional element, but the attributes will be required if the element is used. For example, the "name" attribute on "workspace" element will be required and will not have a default, but the "workspace" element is optional.

          Show
          Randall Hauch
          added a comment - Correct, Ted. Almost everything has a default, and this will be reflected in the updated XSD. Some attributes are on an optional element, but the attributes will be required if the element is used. For example, the "name" attribute on "workspace" element will be required and will not have a default, but the "workspace" element is optional.
          Hide
          Randall Hauch
          added a comment -

          The fix for this issue was incorporated in the changes made for MODE-1435.

          Show
          Randall Hauch
          added a comment - The fix for this issue was incorporated in the changes made for MODE-1435 .

            People

            • Assignee:
              Randall Hauch
              Reporter:
              Randall Hauch
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: