Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Later
-
V2 1.1.0
-
None
-
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).