[jdom-interest] Impact of removing Element.addContent(CDATA) in Beta 9

Alastair Rodgers alastair.rodgers at phocis.com
Wed Nov 19 01:26:30 PST 2003


If you're using Jetty as the JBoss servlet container, you could try setting the 'Java2ClassLoadingCompliance' attribute to false in deploy/jbossweb.sar/META-INF/jboss-service.xml. This makes Jetty use the spec recommendation and search your web app's WEB-INF/lib first before trying the shared app server libs. If you're using Tomcat instead of Jetty then I don't know if / how you'd do this.

If you're also deploying EARs in JBoss, I think you can achieve a similar thing for the EJB JARs contained in your EAR by adding a jboss-app.xml to the EAR and putting something like the following in it: 

<jboss-app>
  <loader-repository>myapp.mycompany.com:loader=myapp.ear</loader-repository>
</jboss-app>

This will mean JBoss will honour the 'Class-Path:' entries in your EJB JARs first, before searching the shared app server libs.

Cheers,
Al.


> -----Original Message-----
> From: jdom-interest-admin at jdom.org 
> [mailto:jdom-interest-admin at jdom.org] On Behalf Of Per Norrman
> Sent: 18 November 2003 21:18
> To: 'Graham Crawford'; jdom-interest at jdom.org
> Subject: SV: [jdom-interest] Impact of removing 
> Element.addContent(CDATA) in Beta 9
> 
> 
> Hi,
> 
> This class loading scheme goes against the recommendation in 
> the Servlet spec, 
> and while it may be the default behaviour, it surley must be 
> possible to
> 
> configure the app server to do the sensible thing.
> 
> 
> 
> -----Ursprungligt meddelande-----
> Från: jdom-interest-admin at jdom.org 
> [mailto:jdom-interest-admin at jdom.org]
> För Graham Crawford
> Skickat: den 18 november 2003 06:01
> Till: jdom-interest at jdom.org
> Ämne: [jdom-interest] Impact of removing 
> Element.addContent(CDATA) in Beta 9
> 
> 
> With the removal of Element.addContent(CDATA) and the addition of
> Element.addContent(Text) in JDOM Beta 9 a number of 
> interesting incompatibilities have arisen.
> 
> 1. Code compiled against an earlier version (lets say Beta 8)
>     will not run with a Beta 9 jar.  This occurs when deploying
>     such code into JBoss 3.2.2.
> 
> 2. Code compiled against the latest version (Beta 9) will not
>     run with an earlier version of JDOM (e.g. Beta 7.)
>     This occurs when deploying such code into JRun 4.
> 
> The class loading algorithm used by both JBoss and JRun
> (and quite possibly many others) mean that the version
> of JDOM they supply is used in preference to any supplied
> by an application.
> 
> The result is that the same application cannot work in both
> of these environments.
> 
> While you can update the JDOM supplied by the application 
> servers you run the risk of both breaking their code as well 
> as other applications running within them.
> 
> As application server vendors (and perhaps application 
> vendors) are very slow to upgrade their dependant libraries 
> it is unwise to make API changes such as this as it can have 
> far reaching implications ...
> 
> ---
> Graham
> 
http://www.ozibug.com - quality web based bug tracking

_______________________________________________
To control your jdom-interest membership: http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@you
rhost.com



More information about the jdom-interest mailing list