Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-177

Improve loading of annotated classes for AnnotationServiceFactory.createAnnotationService(String)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Later
    • V2 1.1.0
    • None
    • odata2-annotation
    • None

    Description

      In some environments (e.g. OSGi, some Application Servers) the AnnotationServiceFactory.createAnnotationService(String) fails to load
      the annotated classes based on package reference.

      The mentioned issue with the AnnotationServiceFactory.createAnnotationService(String) is based on a limitation with Java.
      Unfortunately it is not that easy to get all available classes within a java package. To get these it is necessary to access the folder (i.e. the corresponding folder to the java package) and read the filenames. And dependent on the environment (e.g. Application Server, OSGi, ..) their exists no accessible folder.
      In this case currently the only solution is to use AnnotationServiceFactory.createAnnotationService(Collection) and providing the classes directly.

      In most environments a deployed war which contains the model package in a Tomcat or Jetty works combination the AnnotationServiceFactory.createAnnotationService(String).

      Attachments

        Activity

          People

            mirbo mibo
            mirbo mibo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: