[jbossws-issues] [JBoss JIRA] (JBWS-3678) ReflectiveAttachmentRefScanner recursively scanning enums

Simon Berthaiume (JIRA) jira-events at lists.jboss.org
Tue Jul 30 11:54:25 EDT 2013


Simon Berthaiume created JBWS-3678:
--------------------------------------

             Summary: ReflectiveAttachmentRefScanner recursively scanning enums
                 Key: JBWS-3678
                 URL: https://issues.jboss.org/browse/JBWS-3678
             Project: JBoss Web Services
          Issue Type: Bug
      Security Level: Public (Everyone can see)
            Reporter: Simon Berthaiume
            Priority: Minor


Sorry if this isn't a top-notch bug report, I'm really not that familiar with JBoss and it's modules.

The issue is that when starting JBoss (jboss-5.1.0.GA) with our webservices WAR was taking us a tremendous amount of time (25+ minutes vs ~5 minutes without) and they contain about nothing (just a WS to Bean bridge basically). After much investigation, I discovered that most of the startup time (75%+) was spent in the org.jboss.ws.extensions.xop.jaxws.ReflectiveAttachmentRefScanner.scanBean(Class xmlRoot) method; further investigation revealed that out issues were with Enum types.

Scaning an enum type could be in the O(n^2) order of magnitude as it seems the method will call itself (recursively) on all values of the enum again and again (up to a point). We have some fairly large enums here (1000+ elements, could be bad design, but still) and when the scanner tried to scan them, it could take up to 35 seconds (not ms) for a single class.

As a workaround I figured-out that adding the @XmlMimeType annotation to enum properties of classes used in our WS interfaces sort of solved our issues, the startup time went from 25-30 minutes to about 6.5 minutes.

Not sure if this is a bug or a feature, but I though I should let the community know about this as I have never found any posts regarding that issue.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jbossws-issues mailing list