Details
-
Bug
-
Resolution: Obsolete
-
Minor
-
None
-
None
-
None
-
Workaround Exists
Description
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.