[ 
https://issues.apache.org/jira/browse/AVRO-987?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13181058#comment-13181058
 ] 

Ioannis Canellos commented on AVRO-987:
---------------------------------------

Regarding the maintenance burden: this patch does not duplicate version 
information at all. Package versions are calculated by the maven bundle plugin. 
Ideally we can specify the version ranges of our likes with a small maintenance 
overhead, but from my experience I can say that when you use ranges they don't 
change that often, so the overhead is usually minimal.

Regarding the ClassLoadingUtils and the use of TCCL: I am glad we agree the 
Class.forName needs to replaced. The question is "replaced with what?". 
Unfortunately the options are pretty limited here:

i) Use of TCCL.
ii) Pass the classloader to the object that needs to load the class.
iii) Use object factories, etc. 

I am excluding option (iii) as I think that its not a good fit (personally I 
feel its best fits OSGi powered projects, but this is not the case). Option 
(ii) would be cleaner, but I don't know how easy it is to implement. So I think 
that option (i) as a fallback solution is the easiest way to get things moving 
and in most cases it just works. The fact that its used as last resort has no 
impact on non-OSGi environments, so you don't have to worry about breaking 
things.

We can start with that and then gradully move things towards (ii). I would be 
more than glad to help on this effort.

I am not sure if the comment about, the optional imports was aiming at this 
patch or was a general comment about osgi, but I'll clarify their use anyway 
:-). 

Some of the imports like the servlet api, velocity, xerial etc are not used in 
all use cases (or at least I think that they are not, so feel free to correct 
me), so its not a good idea to have them as required. I totally agree with you 
that they should be used for a good reason, but I think that in this patch the 
reason is good enough. 










 
                
> Make Avro OSGi ready
> --------------------
>
>                 Key: AVRO-987
>                 URL: https://issues.apache.org/jira/browse/AVRO-987
>             Project: Avro
>          Issue Type: New Feature
>          Components: java
>            Reporter: Ioannis Canellos
>         Attachments: AVRO-987-patch.txt, AVRO-987-updated.txt
>
>
> It would be really nice to be able to use Avro inside OSGi. To achieve this 
> two things are required:
> i) Provide proper MANIFEST.MF.
> ii) Deal with potential class loading issues. Avro uses Class.forName a lot 
> and that is not very OSGi friendly.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to