Uploaded image for project: 'JBoss ESB'
  1. JBoss ESB
  2. JBESB-466

Incorrect classloading using Class.forName

    Details

      Description

      Class.forName is used throughout the codebase but this does not work correctly when used in app servers etc. Classes (and resources) should be looked using the thread context classloader before anything else.

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            bill.burke Bill Burke added a comment -

            Fixed..Don't know your procedure for closing. It is tested in the simple-scoped test under qa/junit

            Show
            bill.burke Bill Burke added a comment - Fixed..Don't know your procedure for closing. It is tested in the simple-scoped test under qa/junit
            Hide
            kconner Kevin Conner added a comment -

            Resources have still to be done

            Show
            kconner Kevin Conner added a comment - Resources have still to be done
            Hide
            bill.burke Bill Burke added a comment -

            SimpleDataSource didn't like this change. I switched it back to Class.forName() so the unit test could pass.

            Show
            bill.burke Bill Burke added a comment - SimpleDataSource didn't like this change. I switched it back to Class.forName() so the unit test could pass.
            Hide
            kconner Kevin Conner added a comment -

            Okay, thanks. Will try with my helper class.

            Show
            kconner Kevin Conner added a comment - Okay, thanks. Will try with my helper class.
            Hide
            marklittle Mark Little added a comment -

            Is this an issue with SimpleDataSource that we need to track?

            Show
            marklittle Mark Little added a comment - Is this an issue with SimpleDataSource that we need to track?
            Hide
            kconner Kevin Conner added a comment -

            Modified resource lookup to use helper class.

            Show
            kconner Kevin Conner added a comment - Modified resource lookup to use helper class.
            Hide
            kconner Kevin Conner added a comment -

            Fix for SimpleDataSource has been checked into HEAD with revision 10318 and the MP1 branch with revision 10319.

            Show
            kconner Kevin Conner added a comment - Fix for SimpleDataSource has been checked into HEAD with revision 10318 and the MP1 branch with revision 10319.
            Hide
            beve Daniel Bevenius added a comment -

            I noticed that the method resolveComposerClass (line 274) in JmsGatewayListener still uses Class.forName(). Is this intentional or should it be using ClassUtil.forName?

            Show
            beve Daniel Bevenius added a comment - I noticed that the method resolveComposerClass (line 274) in JmsGatewayListener still uses Class.forName(). Is this intentional or should it be using ClassUtil.forName?
            Hide
            kconner Kevin Conner added a comment -

            Nope, it should be using ClassUtil. It looks like this was reintroduced with a code merge.

            There is another instance of this in the MessageComposer.Factory class so we should do another check for class/resource usage.

            Show
            kconner Kevin Conner added a comment - Nope, it should be using ClassUtil. It looks like this was reintroduced with a code merge. There is another instance of this in the MessageComposer.Factory class so we should do another check for class/resource usage.

              People

              • Assignee:
                kconner Kevin Conner
                Reporter:
                kconner Kevin Conner
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Development