Uploaded image for project: 'Errai'
  1. Errai
  2. ERRAI-63

Classpath scanning for services fails under many deployment scenarios

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Done
    • Affects Version/s: ErraiBus 1.0 Beta, 1.1.0.M1
    • Fix Version/s: 1.1-Final
    • Component/s: ErraiBus
    • Labels:
      None
    • Environment:

      Scenario 1 - All environments where EAR archives are used
      Scenario 2 - All Windows environments using archive formats of any type.

      Description

      Classpath scanning fails to find class files and thus fails to find services and extensions under a few major scenarios.

      Scenario 1 - class files within a WAR within an EAR. I believe this likely extends to any nesting of archive formats but specifically EAR formats are neglected in the codebase (ConfigUtil class).

      Scenario 2 - I see some problems under windows filesystems when handling archive formats of any type. The codebase has "/" hardcoded as the file separator which is bad practice and leads to this problem. The File.separator should be used instead.

      I believe most of the problems can be remedied in the ConfigUtil class but I have not been successful testing any changes yet.

      As a note, classpath scanning is done in many other libraries. It seems silly to keep recreating classpath scanning libraries. A few are listed below.
      http://code.google.com/p/reflections/ (based off of Bill Burke's Scannotations)
      http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.html
      http://commons.apache.org/discovery/

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                heiko.braun Heiko Braun
                Reporter:
                akarl Adam Karl
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: