7 Replies Latest reply on Sep 2, 2009 10:08 AM by jesper.pedersen

    Implementation of the ConnectionManager Service

    gurkanerdogdu

      Hi;

      I would like to start an implementation of the ConnectionManager contract. How could I start this ? Looking at JBoss AS 5.X branch implementation an factoring out inner classes is a good start?

      I have not seen Jesper Pedersen this week in IRC. So I am asking here :)

      Thanks;

        • 1. Re: Implementation of the ConnectionManager Service
          jesper.pedersen

          We had an application server meeting last week ;)

          Yes, looking at the current implementation in Branch_5_x is a good start. And like you said look into refactoring too:

          1) No inner classes
          2) Use an interface for class variables, so we don't depend on the implementation
          3) Create a package for each area - NoTx, Tx, ...
          4) Use Java 5 as much as possible (especially java.util.concurrent)

          Other things to keep in mind is https://jira.jboss.org/jira/browse/JBJCA-30 - but that really ties into 2).

          Just let me know if you have any questions - we can follow up with design of each area in new threads.

          • 2. Re: Implementation of the ConnectionManager Service
            jesper.pedersen

            Another area is of course the test suite for the JCA implementation - currently under

            testsuite/src/main/org/jboss/test/jca
            testsuite/src/main/org/jboss/test/jcaprops
            


            in Branch_5_x.

            The main thing here is that the test suite has to be converted into depending on MC constructs instead of the old JMX bus.

            Furthermore - a lot of the tests in the suites is timing dependant, which should be eliminated in the new test suite - e.g. we can't use Thread.sleep() and similar constructs.

            • 3. Re: Implementation of the ConnectionManager Service
              jesper.pedersen

              A couple of other points - as I took a quick look.

              5) Remove any deprecated functionality
              6) Don't port the management layer (rewrite is needed)
              7) Don't port the statistics layer (rewrite is needed)

              • 4. Re: Implementation of the ConnectionManager Service
                gurkanerdogdu

                Hi Jesper;

                I have ported ConnectionManager 's Connection Pool part. I did the followings


                1* Created a new package structure under the connectionmanager/ package. This reflects better class encapsulation.
                2* Removed inner classes as a top level if it is really necessary
                3* Changed "multiple synchronized" keywords with using concurrent list and sets.
                4* Divided long methods into fine-grained several methods.
                5* Removed MBean and Statistics related methods.
                6* Changed all collection classes with Java 5 generics siblings
                7* Added more comments
                8* Removes unnecessary codes
                9* Apply our code formatter


                Patches are found in the

                https://jira.jboss.org/jira/browse/JBJCA-153

                Thanks ;

                --Gurkan

                • 5. Re: Implementation of the ConnectionManager Service
                  jesper.pedersen

                  Hi Gurkan.

                  Overall the patch looks good, thanks :)

                  A couple of points though:

                  1) Make sure that the patch compiles with JDK5 (couple of classes)

                  2) Check the output from

                  ant checkstyle
                  

                  One class.

                  3) Check the output from
                  ant findbugs
                  

                  There are some warnings that needs to fixed, or added to the findbugs filter.

                  Other than that we will look into the package structure later on if we need to change it.

                  It would be great if you could submit a separate patch with JUnit test cases - I would like to have the
                  ant cobertura
                  

                  task report as high numbers as possible.

                  Thanks again for your contributions !

                  • 6. Re: Implementation of the ConnectionManager Service
                    gurkanerdogdu

                    I have updated patches for "checkstyle, findbugs and Java 5 " problems.
                    I will start to add tests for these classes.

                    --Gurkan

                    • 7. Re: Implementation of the ConnectionManager Service
                      jesper.pedersen

                      Applied with minor modifications, since the JDK5 build didn't work.

                      There are findbugs warnings on AbstractPool - these needs to be resolved.

                      Thanks, again !