Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support lazy initialization within Jaxb2 OXM classes [SPR-5745] #10415

Closed
spring-projects-issues opened this issue May 11, 2009 · 4 comments
Closed
Assignees
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Kenny MacLeod opened SPR-5745 and commented

Jaxb2Marshaller and Jaxb2Unmarshaller initialise their JAXBContext objects inside afterPropertiesSet(). In some cases, particularly with large, complex schema bindings, the creation of the JAXBContext can take a long time (>10 seconds). It would be much preferably to create the context lazily, allowing the marshaller/unmarshaller to initialise quickly, and don't create the jaxb context until it is first needed.


Affects: 3.0 M3

Referenced from: commits 58d3e70

@spring-projects-issues
Copy link
Collaborator Author

Arjen Poutsma commented

For most scenarios, including SOAP and REST Web Services, it's better to prepare the JAXBContent at startup, so that when that first request comes in, the request can be marshalled right away. So I'm closing this as won't fix.

@spring-projects-issues
Copy link
Collaborator Author

Kenny MacLeod commented

I agree, in most cases eager init is better, but not all. It can easily by made optional, with the default as eager init. I don't think this justifies a won't fix, given the ease of implementation and the zero impact on the existing behaviour.

@spring-projects-issues
Copy link
Collaborator Author

Arjen Poutsma commented

Ok, I've reopened and see what I can do.

@spring-projects-issues
Copy link
Collaborator Author

Arjen Poutsma commented

Done.

@spring-projects-issues spring-projects-issues added in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.0 M4 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: data Issues in data modules (jdbc, orm, oxm, tx) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants