Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1435

Improved and working ModeShape AS7 subsystem

    Details

    • Type: Task
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: 3.0.0.Alpha2
    • Fix Version/s: 3.0.0.Alpha4
    • Component/s: JCR, Server
    • Labels:
      None

      Description

      When deployed as a subsystem inside AS7, ModeShape is not able to find the existing CacheManager instance managed by AS7 and instead always creates its own cache manager. (It can currently look it up via JNDI, but IIRC the Infinispan CacheManager in AS7 is not registered in JNDI but may be an AS7 service.)

      We should define a new interface (e.g., CacheManagerLookup or CacheManagerProvider?) that is specified in the configuration (similar to how the ChannelProvider class is specified in the "clustering" section of the configuration).

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            tejones Ted Jones added a comment -

            While this approach may ultimately be problematic, it seems like the only option. I can imagine this being a common issue for other modules deployed to AS 7.

            Show
            tejones Ted Jones added a comment - While this approach may ultimately be problematic, it seems like the only option. I can imagine this being a common issue for other modules deployed to AS 7.
            Hide
            rhauch Randall Hauch added a comment -

            Merged into the 'master' branch.

            Show
            rhauch Randall Hauch added a comment - Merged into the 'master' branch.
            Hide
            rhauch Randall Hauch added a comment -

            Reopening: the subsystem is not correctly serializing the index storage options, and the operations are not working as expected when using CLI.

            Show
            rhauch Randall Hauch added a comment - Reopening: the subsystem is not correctly serializing the index storage options, and the operations are not working as expected when using CLI.
            Hide
            rhauch Randall Hauch added a comment - - edited

            The ModeShape subsystem is now working pretty well, and can be configured via the 'standalone.xml' configuration file (the kit includes a 'standalone-modeshape.xml' file with a sample repository already configured) and/or configured and managed via the AS7 Command Line Interface (CLI) tool.

            The latter required adding and registering OperationStepHandler implementations (e.g., RepositoryWriteAttributeHandler, SequencerWriteAttributeHandler, IndexStorageWriteAttributeHandler, and BinaryStorageWriteAttributeHandler) to make the model node attributes for the services be writable. Many of the attributes for the repository and sequencer services do not require restart, since they automatically and immediately update the configuration for the (running) repository. An AbstractRepositoryConfigurationWriteAttributeHandler class was created to centralize all this logic, and relies upon a new MappedAttributeDefinition interface was defined to supplement some of the attribute definitions with the path within the repository configuration's JSON document, allowing the abstract handler to generically update the repository configuration for any such attribute definition.

            The kit installs several AS7 modules: several for ModeShape (as before this change), one for the Hibernate Search engine, and one for Lucene. This commit changes the HSearch and Lucene modules to use specific slots (other than "main") so that if the Hibernate Search team (or anyone else) produces more 'standard' modules, our modules will not interfere. (I worked with Sanne Grinovero and Scott Marlow on the module IDs, so technically if they define modules with the same IDs but with 'master', our slots will merge into modules.)

            Additionally, prior to this commit there were a 'remove-*-binary-storage' operation for each 'add-*-binary-storage' operation, and a 'remove-*-index-storage' operation for each 'add-*-index-storage' operation. Now, the 'add-*' operations still exist, but there is only one 'remove-index-storage' operation that handles removing all index storage types, and one 'remove-binary-storage' operation that handles removing all binary storage types. This makes configuring the index and binary storage options much easier.

            The resource filtering specified in the 'deploy/jbossas/pom.xml' was incorrect and has not been used since the AS7 kit was first created. The assembly now does the filtering, so this section in the POM is no longer needed.

            Show
            rhauch Randall Hauch added a comment - - edited The ModeShape subsystem is now working pretty well, and can be configured via the 'standalone.xml' configuration file (the kit includes a 'standalone-modeshape.xml' file with a sample repository already configured) and/or configured and managed via the AS7 Command Line Interface (CLI) tool. The latter required adding and registering OperationStepHandler implementations (e.g., RepositoryWriteAttributeHandler , SequencerWriteAttributeHandler , IndexStorageWriteAttributeHandler , and BinaryStorageWriteAttributeHandler ) to make the model node attributes for the services be writable. Many of the attributes for the repository and sequencer services do not require restart, since they automatically and immediately update the configuration for the (running) repository. An AbstractRepositoryConfigurationWriteAttributeHandler class was created to centralize all this logic, and relies upon a new MappedAttributeDefinition interface was defined to supplement some of the attribute definitions with the path within the repository configuration's JSON document, allowing the abstract handler to generically update the repository configuration for any such attribute definition. The kit installs several AS7 modules: several for ModeShape (as before this change), one for the Hibernate Search engine, and one for Lucene. This commit changes the HSearch and Lucene modules to use specific slots (other than "main") so that if the Hibernate Search team (or anyone else) produces more 'standard' modules, our modules will not interfere. (I worked with Sanne Grinovero and Scott Marlow on the module IDs, so technically if they define modules with the same IDs but with 'master', our slots will merge into modules.) Additionally, prior to this commit there were a ' remove-*-binary-storage ' operation for each ' add-*-binary-storage ' operation, and a ' remove-*-index-storage ' operation for each ' add-*-index-storage ' operation. Now, the ' add-* ' operations still exist, but there is only one ' remove-index-storage ' operation that handles removing all index storage types, and one ' remove-binary-storage ' operation that handles removing all binary storage types. This makes configuring the index and binary storage options much easier. The resource filtering specified in the ' deploy/jbossas/pom.xml ' was incorrect and has not been used since the AS7 kit was first created. The assembly now does the filtering, so this section in the POM is no longer needed.
            Hide
            rhauch Randall Hauch added a comment -

            Merged into the 'master' branch.

            Show
            rhauch Randall Hauch added a comment - Merged into the 'master' branch.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development