Question

i have been working with EclipseLink in the past couple of days to implement one of our small converter applications. The input for these are usually one document format type and now i.e. in the future a sophisticated metadata xml.

Since we have a schema for this and there are still slight changes to be expected in the future, i wanted to give the JAXB approach a try and i like it very much so far.

However, as i finish the application i noticed that due to the usage of eclipselink.jar, the application is rather large (~10MB) in comparision to similar converters (~1MB). This is due to the fact that there is, for reasons of technological environment, no global classpath for the converter jars, but every one of them needs to be self sufficient.

This means that i copy every required jar into one big jar using ant.

I am not quite fond of this approach myself but so far can only hint that some different approach may or may not be more elegant. There are some smaller jars containing fragments of needed classes with the eclipselink distribution, but i found none that contained the

 org.eclipse.persistence.jaxb.JAXBContextFactory

(plus the dependencies for this).

It seems to me, but this is a lot of guess work, that the

eclipselink.jar 

includes the complete-wellness-package-that-leaves-nothing-to-be-desired and that is a bit of an overkill for me.

Long story short: Is there a light weight version of the eclipselink.jar which would support the unmarshalling of an xml for which i generated java classes in advance? Or am i trying the impossible?

Thank you in advance

Christian

Was it helpful?

Solution

Instead of using eclipselink.jar, you can use the bundles. Then you will need to include the following

  • org.eclipse.persistence.asm.version.jar
  • org.eclipse.persistence.core.version.jar
  • org.eclipse.persistence.moxy.version.jar

The total is still larger than other providers, but we're working on fixing that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top