-
Notifications
You must be signed in to change notification settings - Fork 44
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
AS2ReceiveServlet startup issue in Spring Boot application if servlet is configured programmatically #96
Comments
Thanks for the input. Unfortunately I am not an expert in Spring Boot, but I think I understand the issue. Additionally I added static init/destroy methods to
Based on these changes you can create a derived Servlet that does |
@yaskovdev do you mind I take your as2-sandbox as a spring boot template into the as2-lib? |
@phax, thank you for the quick response and fix. |
I believe that in order to fully resolve the issue changes in |
Okay, I will check this out. Do I have the permission to publish your code under the Apache 2 license, stating you as the original author? |
Thank you. |
Initial version is in. An |
The project that reproduces the issue is here. The error is the same as in this issue (No global scope object has been set!), however the
AS2WebAppListener
is in place.The exception happens on
AS2ReceiveServlet
instantiation and is caused bythis.m_aStatusMgr = ServletStatusManager.getInstance();
line from theAbstractXServlet
. The issue is reproducible when the servlet is configured programmatically because in this case instantiation of the servlet happens before theAS2WebAppListener
has a chance to do its job.As a temporary solution I moved the problematic line of code from the constructor to the
init
method. Would it make more sense to move this line toinit
method permanently to make possible to use the servlet with Spring Boot?The text was updated successfully, but these errors were encountered: