Caching JAXB scheme between server runs

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Caching JAXB scheme between server runs

Avner Levy

Hi,

I have an application with 2500 entities classes that may be required by web services (CXF) although on most installations only a small number will be actually used (around 200).

The initialization of the JAXB context takes a long time and required a lot of memory.

I was thinking of adding the possibility to cache the JAXB model between server runs.

This way when I create the context it only reads the processed data from last run. In additional I will generate the accessors only when they are really needed.

It will be great to get some comments / inputs on the idea from experienced JAXB developers.

Thanks in advance,

  Avner

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Caching JAXB scheme between server runs

Iaroslav Savytskyi
Hi, Avner,

If I understood you right you are going to cache JAXBContext between session. I would say that this is expected behaviour and JAXBContext could be used in this way. Even it could be used simultaneously from several threads.

--
Have a nice day.
Iaroslav

On 9 Mar 2014, at 16:00, Avner Levy <[hidden email]> wrote:

> Hi,
> I have an application with 2500 entities classes that may be required by web services (CXF) although on most installations only a small number will be actually used (around 200).
> The initialization of the JAXB context takes a long time and required a lot of memory.
> I was thinking of adding the possibility to cache the JAXB model between server runs.
> This way when I create the context it only reads the processed data from last run. In additional I will generate the accessors only when they are really needed.
> It will be great to get some comments / inputs on the idea from experienced JAXB developers.
> Thanks in advance,
>   Avner

Loading...