5 Replies Latest reply on Dec 8, 2016 11:29 AM by hchiorean

    Native Management API added git connector not available until reload

    pverboom

      Hi,

       

      Setup :

      Wildfly 10

      Modeshape 5.2 with configuration through standalone.xml

       

      I am adding git connectors through the Native Management API. This all works fine except from the part that I need to do a reload to make them active.

      The return information only says "outcome" => "success"

      It doesn't mention that we need a reload there are non "operation-requires-reload" => true or "process-state" => "reload-required" in the return information.

      Is this a bug or does it really need a full Wildfly reload. Is there any way to reload the git connectors without having to reload everything, I would think it should be an easy thing to add a git directory as an extra node without needing to reload Wildfly.

       

      Any help highly appreciate,

      Patrick

       

       

        • 1. Re: Native Management API added git connector not available until reload
          hchiorean

          Currently the repository needs to be restarted after a connector is changed/added/removed. So with the current behavior, the bug is the fact that Wildfly doesn't tell you it needs to be restarted after you add the connector.

           

          However, in theory, you shouldn't have to restart the entire repository and it should be possible to just refresh the connectors. This is a bit more convoluted code-wise, but you could log an enhancement request for this.

          • 2. Re: Native Management API added git connector not available until reload
            pverboom

            Is there a way to only restart the repository? So far I only found a reload on the root from Wildfly what basically restarts everything.

            For both the subsystem as for repository it shows me the following list of operations:

                    "add",

                    "list-add",

                    "list-clear",

                    "list-get",

                    "list-remove",

                    "map-clear",

                    "map-get",

                    "map-put",

                    "map-remove",

                    "query",

                    "read-attribute",

                    "read-attribute-group",

                    "read-attribute-group-names",

                    "read-children-names",

                    "read-children-resources",

                    "read-children-types",

                    "read-operation-description",

                    "read-operation-names",

                    "read-resource",

                    "read-resource-description",

                    "remove",

                    "undefine-attribute",

                    "whoami",

                    "write-attribute"

            • 3. Re: Native Management API added git connector not available until reload
              hchiorean

              IIRC these are the default Wildfly Management API operations. To answer your question, no, there is no way to just restart a repository via the WF Mgmt console, you have to :reload the entire server.

              The alternative is to write your own custom code which restarts the repository (using the ModeShape API) but that would be outside the management API.

              • 4. Re: Native Management API added git connector not available until reload
                pverboom

                Could you give me some pointers on where to look in the Modeshape API to restart the repository?

                • 5. Re: Native Management API added git connector not available until reload
                  hchiorean

                  Thinking about this, in the context of Wildfly restarting a ModeShape repository via the API (essentially using the ModeShapeEngine class from the modeshape-core module) will not work. This is because in Wildfly there are other abstractions (mainly Wildfly Services) which need to be started and stopped for repositories, binary stores, connectors etc to work. Simply put, everything around restarting is much more complicated in Wildfly.

                   

                  So I don't see a way to work around this atm. In the case of connectors we'd have to enhance the code to support the feature of "hot-swapping" connectors in Wildfly.