Deriving/sharing a the JAXB Context used by Metro's JAX-WS implementation?

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

Deriving/sharing a the JAXB Context used by Metro's JAX-WS implementation?

Tyler VanGorder

Hi,

 

We have a large, enterprise application that exposed 50+ web services and all  of these web services use the same model objects.

 

The problem is that each web service creates its own, almost identical JAXB context to do the marshaling/unmarshaling.

 

My question:

 

Is there a way to create a single, shared JAXB context that is initialized once and then used by each of the web services?

 

I understand that each web service may have additional classes that need to be added to this context, so I am curious if there is a way to create a hierarchy of contexts?

 

 

So is there a way to have :

 

                Shared Context (with most of the common model objects in it). <- Which I can easy create.

                                | - WebService 1 Context <- Contains any classes that are not in the shared context.

                                | - WebService 2 Context <- Contains any classes that are not in the shared context.

                                | - WebService 3 Context <- Contains any classes that are not in the shared context.

                                | - WebService 4 Context <- Contains any classes that are not in the shared context.

 

 

Having this type of hierarchal model would result in much more efficient startup time and should (in theory) reduce the memory footprint of the application.

 

 

Thanks

 

 

cid:image001.jpg@01CDAABF.4A872A20  

 

Tyler Van Gorder
Software Team Lead

EXL Landa
O: +1 (530) 891-0853 Ext 3055

www.exllanda.com

 

 

 

 

 



This electronic mail message and any file sent with it are intended solely for the named recipients and may contain confidential and proprietary business information of ExlService and its affiliates. If you are not a named recipient, please notify the sender immediately and delete the original message and all files sent with it. You may not disclose the contents to any other person, use this electronic mail message or its contents for any purpose or further store or copy its contents in any medium.
Loading...