You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

antlib_classloaders.xml 2.0 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <?xml version="1.0"?>
  2. <document>
  3. <properties>
  4. <index value="2"/>
  5. <author email="antoine@apache.org">Antoine Levy-Lambert</author>
  6. <title>Antlib Class Loaders</title>
  7. </properties>
  8. <body>
  9. <section name="Jose Alberto Fernandez">
  10. <p>
  11. Let me first say that this feature appeared by the need to be able to say,
  12. </p>
  13. <source><![CDATA[
  14. <antlib name="A" classpathref="XYZ"/>
  15. <antlib name="B" classpathref="XYZ"/>
  16. ]]></source>
  17. <p>
  18. And being able to make sure that B and A use the same classLoader
  19. and therefore they can use each other components.
  20. </p>
  21. <p>
  22. My solution at the time was this idea of a named classloader that
  23. you could define using a classpath, and then tell your antlibs use
  24. this or that classloader, if you use the same classloader visibility
  25. is guaranteed.
  26. </p>
  27. </section>
  28. <section name="Stefan Bodewig 23.04.2003 17:11">
  29. ...
  30. <p>
  31. I understand that usecase (using the same class loader for 2 different antlibs)
  32. and think it's important. See Steve
  33. Loughran's comment on the .NET tasks wanting to have access to the
  34. datatypes defined in the cpptasks project for example.
  35. </p><p>
  36. Take a look at what Costin had done to &lt;taskdef&gt; and &lt;typedef&gt; with
  37. the loaderref attribute. This has now (i.e. CVS HEAD) been
  38. generalized in ClasspathUtils, the infrastructure for named
  39. classloaders is there - at least the foundation for it.
  40. </p><p>
  41. Stefan
  42. </p>
  43. </section>
  44. <section name="Costin Manolache 29.04.2003 18:52">
  45. <p>
  46. The main issue is how to enforce ordering to deal with dependencies
  47. between the antlibs.
  48. </p><p>
  49. Or simply do not deal with dependencies, ie antlibs must not (yet)
  50. depend on on the other, except for the core ones.
  51. </p><p>
  52. Using an unified class loader ( at least as default ) - like jboss is doing,
  53. or like JMX loading policy - has a lot of benefits. It also has some cases
  54. that are not well covered - so we'll probably need to deal with both
  55. "unified loader" and "loader hierarchy" cases.
  56. </p>
  57. </section>
  58. </body>
  59. </document>