|
Hi Chad,
I have a small comment on your patch.
Hmm... Now when writing some questions arise in my brain What do you think? Yes, I see what you mean. I'll think about it a bit more and submit another patch with what I come up with.
I've looked over this again. I see that the current function/datatype/etc initializers employ classpath scanning. This is very complex code and is unlikely to work in a number of environments (e.g. OSGi, Google App Engine, certain web application containers). Is there a real reason why this shouldn't be done as it has been done in the past; new an instance of the object and just register it with the appropriate Converter class?
I could understand doing this type of classpath scanning if it wasn't so brittle and if it picked up more than just HERAS defined types. But it is brittle and it doesn't support anything other than HERAS types. So I would strongly recommend simplifying this code. Sorry for my late response. The issue went under.
We do the scanning to be able to automatically pick up the e.g. function classes within the functions package. This to not be forced to initialize all 209+ functions "by hand" within the initializer. Your objection about environment that maybe don't work (OSGi, Google App Engine, ...) I think that we are very open to make the experience with those. I am willing to create test for all of these. I also would take it on my list of todos. The reason that I am not convinced to throw everything into trash and make it the very simple way is that we think this is a very neat way of getting all those e.g. functions into the JAXB stuff. This issue will be again discussed when solving the issue
We can agree with Chad that for the basic types of HERAS-AF the dynamic classloading is a little bit overengineered. We will change that most probably. On the other hand we still will try to provide (an optional) possibility for users to dynamically add their own types. After
JAXBInitializer.run();
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Users who only need to initialize the JAXB support can now call ContextAndPolicy.initializeJAXBContextAndPolicyConfiguration() directly.