[GLASSFISH-17039] 3.1.1 deployment performance - webservices module get loaded for a web app with no webservices Created: 13/Jul/11  Updated: 15/Nov/11  Resolved: 22/Aug/11

Status: Resolved
Project: glassfish
Component/s: web_services
Affects Version/s: 3.1.1
Fix Version/s: 3.1.2_b02

Type: Bug Priority: Major
Reporter: Hong Zhang Assignee: Bhakti Mehta
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: Text File glassfish-17039.patch     Text File started-47.log    
Issue Links:
Dependency
blocks GLASSFISH-16460 Performance regression in server startup Resolved
Tags: 3_1-next, 3_1_1-scrubbed

 Description   

Using the felix console to monitor which module get loaded for the web application deployment, noticed the following webservices modules got active:

47|Active | 1|org.glassfish.webservices.jsr109-impl (3.1.1.SNAPSHOT)

and following got resolved:
17|Resolved | 1|org.glassfish.security.webservices.security (3.1.1.SNAPSHOT)
52|Resolved | 1|org.glassfish.metro.webservices-osgi (2.1.1.b07)

we need to figure out which dependency had triggered the webservices related modules get loaded/resolved, they should not be for a web application with no webservices. The test web application is attached in its parent issue.



 Comments   
Comment by Hong Zhang [ 13/Jul/11 ]

Futher analysis showed the jsr109-impl module was brought in as it contains classes implements AnnotationHandler interface and the SJSASFactory injects the list of the AnnotationHandler [].

-----------------------------------
Inhabitants / stack combination
-----------------------------------
Requested by LazyInhabitant-14679795(org.glassfish.webservices.annotation.handlers.WebServiceHandler, active: null) called from java.util.AbstractList$Itr.next:345 metadata

{class: [org.glassfish.webservices.annotation.handlers.WebServiceHandler] index: [org.glassfish.apf.AnnotationHandler] }

Requested by ConstructorCreator-23397116(com.sun.enterprise.deployment.annotation.factory.SJSASFactory) called from com.sun.enterprise.web.WebContainer.loadSystemDefaultWebModules:1424 metadata

{class: [com.sun.enterprise.deployment.annotation.factory.SJSASFactory] index: [org.glassfish.api.ContractProvider] }

Requested by SingletonInhabitant-10947277(com.sun.enterprise.deployment.annotation.factory.SJSASFactory) called from com.sun.enterprise.web.WebContainer.loadSystemDefaultWebModules:1424 metadata

{class: [com.sun.enterprise.deployment.annotation.factory.SJSASFactory] index: [org.glassfish.api.ContractProvider] }
Comment by Hong Zhang [ 14/Jul/11 ]

Can we try to move the AnnotationHandler impl classes from this jsr109-impl module to another module to avoid loading this module?

We cannot move them to the existing connector module as we don't want to introduce dol dependency on that module. Maybe we have to make a new module called jsr109-glue or something and put the handlers there (and of course make sure this new module does not have dependency on jsr109-impl). It's an additional module, but as jsr109-impl module is a good sized module, I think it will be worthwhile. Any other alternatives you guys can think of?

Comment by ramapulavarthi [ 15/Jul/11 ]

Moving the web services annotation handlers to a new module jsr109-glue so that DOL does not activate jsr109-impl and its dependencies.

Comment by scatari [ 26/Jul/11 ]

Marking to be fixed in the patch release that follows 3.1.1. Does not affect primary functionality of the product, downgrading.

Comment by Bhakti Mehta [ 22/Aug/11 ]

Committed fix in 3.1.2 rev 48931

Comment by Bhakti Mehta [ 24/Aug/11 ]

Committed svn rev 49014 on trunk

Comment by Lukas Jungmann [ 14/Nov/11 ]

also resource bundles have to be moved as GF 3.1.2 (r50799) currently fails when trying to log a message with:

SEVERE: The log message is empty or null. Please log an issue against the component in the logger field.
SEVERE: Exception while deploying the app [WebApplication1]
SEVERE: nullat org.glassfish.apf.AnnotationInfo@2f9c3beb
java.lang.IllegalStateException: nullat org.glassfish.apf.AnnotationInfo@2f9c3beb
...
Caused by: nullat org.glassfish.apf.AnnotationInfo@2f9c3beb
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:367)
...
Caused by: java.lang.NullPointerException
at org.glassfish.webservices.connector.annotation.handlers.WebServiceHandler.processAnnotation(WebServiceHandler.java:141)
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:344)
... 45 more

I'm going to fix this

Comment by Lukas Jungmann [ 15/Nov/11 ]

3.1.2/revision 50861 and trunk/revision 50870

Generated at Sat Aug 27 04:24:39 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.