5 Replies Latest reply on May 31, 2011 6:19 PM by jicken

    Import / Export tool branch

    clebert.suconic

      I have created a branch for the export/tool branch that Torben Jaeger is writing...

       

      https://svn.jboss.org/repos/hornetq/branches/Branch_2_2_EAP_export_tool/

       

      Torben has sent me an initial patch and I have done a couple of changes such as removing changes on Journal (the correct place is on StorageManager), and changing a few package names

       

       

      There are a few things we need to change:

       

       

      - I wouldn't use a parser on generating the messages. I would just print directly to the output Stream. As a matter of fact that will be better especially when we start loading data from paging.

       

      - I didn't like adding a new dependency to jaxb. That would go against our distribution, and we need this without adding any new dependencies.

       

      - Importing, there shouldn't be a need to load the target journal. We could just query the destination and create the queue when needed.

       

       

      @Torben: give me your jboss account and I will add you as a committer so we can work on that branch.

        • 1. Import / Export tool branch
          jicken

          Clebert Suconic wrote:

           

          - Importing, there shouldn't be a need to load the target journal. We could just query the destination and create the queue when needed.

           

           

          Clebert, this is done now.

           

          The handleMessage() now queries the queue name which the message should be bound to using session.queueQuery().

          If the queue does not exist, create it. Further add a mapping for old/new queue ids.

           

          The QueueQuery object didn't carry the queue ID. I've added that (and the name as well) to make the mapping work. The SessionQueueQueryResponseMessage was affected as well.

           

          The UnitTest passes (50-99 asserts after the import) except an error in tearDown():

           

          junit.framework.AssertionFailedError: invm registry still had acceptors registered

                    at org.hornetq.tests.util.UnitTestCase.cleanupPools(UnitTestCase.java:966)

                    at org.hornetq.tests.util.UnitTestCase.tearDown(UnitTestCase.java:879)

                    at org.hornetq.tests.util.ServiceTestBase.tearDown(ServiceTestBase.java:91)

           

          I'll investigate that tomorrow.

          • 2. Import / Export tool branch
            clebert.suconic

            The tearDown was an issue with not stopping a server. I have fixed it.

             

            There's the dependency issue now. I need to verify  what would be the implications.

             

             

            I would prefer not having it. We can discuss about it tomorrow.

            • 3. Import / Export tool branch
              jicken

              Torben Jaeger wrote:

              SessionQueueQueryResponseMessage was affected as well.

               

               

              I think with the modification of this object I've introduced some compatibility issues.

               

              I did a test run at ... (u know the customer). The export went fine but I've got problems with the import (ArrayIndexOutOfBounds) because of this object.

              An older version of SQQRM doesn't know anything about the queue ID which I need in order to map old and new queues. So it's not encoded in the response (old SessionQueueQueryResponseMessage::encodeRest()) which I decode with the assumption that the ID is included (new SessionQueueQueryResponseMessage::decodeRest()).

               

              As this is also used if a consumer is created (ServerSessionPacketHandler::handlePacket(), PacketImpl::SESS_CREATECONSUMER) I am not sure about the compatibility of different versions.

              Maybe the creation of a consumer will fail then.

               

              We have to be aware of this ...

              • 4. Import / Export tool branch
                clebert.suconic

                I didn't realize you have changed it. You can't change the wire protocol.

                 

                 

                Look at session.bindingQuery. Or we could use a management operation .

                • 5. Re: Import / Export tool branch
                  jicken

                  Clebert Suconic wrote:

                   

                  I didn't realize you have changed it. You can't change the wire protocol.

                   

                  Modifications to the wire protocol are rolled back.

                   

                  I've fixed a bug wrt to the payload and added asserts for that. I've sent a mail to Yann including the new jar as well for a quick test.