Michael Bolz created OLINGO-177:
-----------------------------------

             Summary: Improve loading of annotated classes for 
AnnotationServiceFactory.createAnnotationService(String)
                 Key: OLINGO-177
                 URL: https://issues.apache.org/jira/browse/OLINGO-177
             Project: Olingo
          Issue Type: Improvement
          Components: odata2-annotation
    Affects Versions: V2 1.1.0
            Reporter: Michael Bolz


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).



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to