This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Summary: | org.netbeans.modules.j2ee.deployment classes are loaded on NetBeans startup with LimeWire project | ||
---|---|---|---|
Product: | serverplugins | Reporter: | Alexander Kouznetsov <mrkam> |
Component: | Infrastructure | Assignee: | Petr Hejl <phejl> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | apireviews, issues, jtulach, pjiricka, tzezula, vkraemer |
Priority: | P3 | Keywords: | API, API_REVIEW_FAST, PERFORMANCE, TEST |
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Windows XP | ||
URL: | http://wiki.netbeans.org/FitnessViaWhiteAndBlackList | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 180893 | ||
Attachments: |
Stacktraces
Stacktraces Stacktrace the patch updated patch Autogenerating the overview page from content of arch.xml updated patch updated once again |
Description
Alexander Kouznetsov
2008-09-24 10:13:04 UTC
Created attachment 70419 [details]
Stacktraces
Any justification for this being filed as P2? We are facing significant regression between the start time of IDE without and with open project. In our current understanding, the major slowdown is caused by a lot of unneeded and unrelated classes being loaded uselessly. We have a feeling that it is not appropriate to initialize all J2EE servers when one uses plain JavaSE project. I guess the problem is somewhere in these lines: org.netbeans.modules.j2ee.deployment.devmodules.api.J2eeModule.<clinit>(J2eeModule.java:270) org.netbeans.modules.j2ee.deployment.impl.ServerRegistry.<clinit>(ServerRegistry.java:565) org.netbeans.modules.j2ee.deployment.plugins.api.InstanceProperties.getInstanceList(InstanceProperties.java:290) org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.getServerInstanceIDs(Deployment.java:296) org.netbeans.modules.j2ee.deployment.impl.query.J2eePlatformSourceForBinaryQuery.findSourceRoots2 Can this be delayed? Used only with Web projects? If not, then OK, let leave the fix for post 6.5, but please spend some time investigating this problem now. Thanks. *** Issue 148220 has been marked as a duplicate of this issue. *** Looks like org.netbeans.modules.java.source.classpath.GlobalSourcePath is querying all registered SourceForBinaryQueries. As server plugins can provide sources to the classes they publish the j2eeserver module registers J2eePlatformSourceForBinaryQuery that queries the registered instances. Right now I can't find any safe solution for 6.5 as SourceForBinaryQuery does not pass any project related information afaik. As there is no project information available in query implementation it is impossible (in the current state) to avoid server instance initialization. The problem was not introduced in 6.5. Lowering to P3. I doubt that this is a regression, any query to the SFBQ which is not handled by some SQBQImpl with higher priority causes initialization of servers. The j2ee query needs to know the location of binaries to either return null or SQBQ.Result. In the future the j2ee SFBQ can do some caching of binaries but it may cause problems when the server changes outside the IDE. Classes from issue 148220: org.netbeans.modules.j2ee.sun.ide.dm.Bundle org.netbeans.modules.j2ee.sun.ide.dm.Bundle_ru org.netbeans.modules.j2ee.sun.ide.dm.Bundle_ru_RU org.netbeans.modules.j2ee.sun.ide.dm.Constants org.netbeans.modules.j2ee.sun.ide.dm.SunDeploymentFactory org.netbeans.modules.j2ee.sun.ide.j2ee.Constants org.netbeans.modules.j2ee.sun.ide.j2ee.OptionalFactory org.netbeans.modules.j2ee.sun.ide.j2ee.PluginProperties org.netbeans.modules.j2ee.sun.share.CharsetMapping org.netbeans.modules.j2ee.sun.share.SecurityMasterListModel org.netbeans.modules.j2ee.weblogic9.WLDeploymentFactory org.netbeans.modules.j2ee.weblogic9.WLDeploymentManager org.netbeans.modules.j2ee.weblogic9.optional.WLOptionalDeploymentManagerFactory org.netbeans.modules.j2ee.websphere6.WSDeploymentFactory org.netbeans.modules.j2ee.websphere6.WSVersion org.netbeans.modules.j2ee.websphere6.optional.WSOptionalDeploymentManagerFactory *** Issue 148174 has been marked as a duplicate of this issue. *** Classes from issue 148174: org.netbeans.modules.glassfish.common.GlassfishInstanceProvider org.netbeans.modules.glassfish.javaee.Hk2DeploymentFactory org.netbeans.modules.glassfish.javaee.Hk2OptionalFactory org.netbeans.modules.glassfish.spi.ServerUtilities *** Issue 149556 has been marked as a duplicate of this issue. *** Classes from issue 149556: org.netbeans.modules.tomcat5.TomcatFactory org.netbeans.modules.tomcat5.TomcatManager$TomcatVersion org.netbeans.modules.tomcat5.ide.OptionalFactory *** Issue 149563 has been marked as a duplicate of this issue. *** Classes from issue 149563: org.netbeans.spi.server.ServerInstanceProvider The following three classes shouldn't also be loaded: javax.enterprise.deploy.shared.factories.DeploymentFactoryManager javax.enterprise.deploy.spi.DeploymentManager javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException Comment from jtulach: Loaded by org.netbeans.modules.j2ee.deployment.impl.ServerRegistry.addPlugin(ServerRegistry.java:181) imho a bug in j2eeserver. Created attachment 71766 [details]
Stacktraces
One more class to avoid: org.netbeans.modules.websvc.wsstack.jaxrs.glassfish.v3.GlassFishV3LookupProvider Created attachment 75279 [details]
Stacktrace
Moving to j2eeserver, where most of these classes reside. Updated list of classes from serverplugins in build 20090608, per issue 148178: org.netbeans.modules.j2ee.genericserver.GSDeploymentFactory org.netbeans.modules.j2ee.genericserver.ide.GSOptionalDeploymentManagerFactory org.netbeans.modules.j2ee.jboss4.JBDeploymentFactory org.netbeans.modules.j2ee.jboss4.ide.JBOptionalDeploymentManagerFactory org.netbeans.modules.j2ee.jboss4.ide.ui.JBPluginUtils org.netbeans.modules.j2ee.jboss4.ide.ui.JBPluginUtils$Version org.netbeans.modules.j2ee.sun.api.ServerLocationManager org.netbeans.modules.j2ee.sun.ide.dm.Bundle org.netbeans.modules.j2ee.sun.ide.dm.Bundle_en org.netbeans.modules.j2ee.sun.ide.dm.Bundle_en_US org.netbeans.modules.j2ee.sun.ide.dm.Constants org.netbeans.modules.j2ee.sun.ide.dm.SunDeploymentFactory org.netbeans.modules.j2ee.sun.ide.j2ee.Constants org.netbeans.modules.j2ee.sun.ide.j2ee.OptionalFactory org.netbeans.modules.j2ee.sun.ide.j2ee.PluginProperties org.netbeans.modules.j2ee.sun.ide.j2ee.RunTimeDDCatalog org.netbeans.modules.j2ee.sun.share.CharsetMapping org.netbeans.modules.j2ee.sun.share.SecurityMasterListModel org.netbeans.modules.j2ee.weblogic9.WLDeploymentFactory org.netbeans.modules.j2ee.weblogic9.WLDeploymentManager org.netbeans.modules.j2ee.weblogic9.optional.WLOptionalDeploymentManagerFactory ok, for full update from the same build (20090608) j2ee.deployment classes: org.netbeans.modules.j2ee.deployment.config.J2eeModuleAccessor org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment org.netbeans.modules.j2ee.deployment.devmodules.api.J2eeModule org.netbeans.modules.j2ee.deployment.devmodules.spi.InstanceListener org.netbeans.modules.j2ee.deployment.impl.Server org.netbeans.modules.j2ee.deployment.impl.ServerRegistry org.netbeans.modules.j2ee.deployment.impl.ServerRegistry$InstanceInstallListener org.netbeans.modules.j2ee.deployment.impl.ServerRegistry$PluginInstallListener org.netbeans.modules.j2ee.deployment.impl.gen.nbd.CommonBean org.netbeans.modules.j2ee.deployment.impl.gen.nbd.ContainerLimitation org.netbeans.modules.j2ee.deployment.impl.gen.nbd.NetbeansDeployment org.netbeans.modules.j2ee.deployment.impl.gen.nbd.WebContextRoot org.netbeans.modules.j2ee.deployment.impl.query.J2eePlatformSourceForBinaryQuery org.netbeans.modules.j2ee.deployment.impl.sharability.SourceForBinaryQueryImpl org.netbeans.modules.j2ee.deployment.plugins.api.InstanceProperties org.netbeans.modules.j2ee.deployment.plugins.spi.AntDeploymentProvider org.netbeans.modules.j2ee.deployment.plugins.spi.DatasourceManager org.netbeans.modules.j2ee.deployment.plugins.spi.FindJSPServlet org.netbeans.modules.j2ee.deployment.plugins.spi.IncrementalDeployment org.netbeans.modules.j2ee.deployment.plugins.spi.JDBCDriverDeployer org.netbeans.modules.j2ee.deployment.plugins.spi.LookupProvider org.netbeans.modules.j2ee.deployment.plugins.spi.MessageDestinationDeployment org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory org.netbeans.modules.j2ee.deployment.plugins.spi.ServerInitializationException org.netbeans.modules.j2ee.deployment.plugins.spi.ServerInstanceDescriptor org.netbeans.modules.j2ee.deployment.plugins.spi.StartServer org.netbeans.modules.j2ee.deployment.plugins.spi.TargetModuleIDResolver and glassfish org.netbeans.modules.glassfish.common.GlassfishInstanceProvider org.netbeans.modules.glassfish.javaee.Hk2DeploymentFactory org.netbeans.modules.glassfish.javaee.Hk2OptionalFactory org.netbeans.modules.glassfish.javaee.RunTimeDDCatalog org.netbeans.modules.glassfish.javaee.ide.RegisteredDDCatalogImpl org.netbeans.modules.glassfish.spi.RegisteredDDCatalog org.netbeans.modules.glassfish.spi.ServerUtilities tomcat org.netbeans.modules.tomcat5.TomcatFactory org.netbeans.modules.tomcat5.TomcatManager$TomcatVersion org.netbeans.modules.tomcat5.ide.OptionalFactory enterprise javax.enterprise.deploy.shared.factories.DeploymentFactoryManager javax.enterprise.deploy.spi.DeploymentManager javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException websvc org.netbeans.modules.websvc.wsstack.jaxrs.glassfish.v2.GlassFishV2LookupProvider org.netbeans.modules.websvc.wsstack.jaxrs.glassfish.v3.GlassFishV3LookupProvider org.netbeans.modules.websvc.wsstack.jaxws.glassfish.v2.GlassFishV2LookupProvider org.netbeans.modules.websvc.wsstack.jaxws.glassfish.v3.GlassFishV3LookupProvider org.netbeans.modules.websvc.wsstack.jaxws.glassfish.v3.GlassFishV3ee6LookupProvider org.netbeans.modules.websvc.wsstack.jaxws.jboss.JBossLookupProvider org.netbeans.modules.websvc.wsstack.jaxws.tomcat.TomcatLookupProvider org.netbeans.modules.websvc.wsstack.jaxws.weblogic.WebLogicLookupProvider *** Bug 177841 has been marked as a duplicate of this bug. *** Optional FO attribute added to prevent loading when not rally necessary. Please review. Vince, can you review changes I made to your code? Thanks. Created attachment 94152 [details]
the patch
Very good. Simple & effective. Y01 Mention the urlPattern as a property in arch.xml as <api .../> Created attachment 94175 [details]
updated patch
Updated patch:
- updated plugin layer description
- test
Re. Y01: Rather than changing apichanges.xml and defining new apidef I suggest to use <api/> tag in arch.xml. More info at http://wiki.netbeans.org/APIDevelopment If you do this, the overview page of http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-j2eeserver/overview-summary.html shall get nice table with list of exported APIs[1][2]. [1] There is broken link on that page [2] I suggest to make it more standard, I can help with that. Created attachment 94181 [details]
Autogenerating the overview page from content of arch.xml
Created attachment 94185 [details]
updated patch
Updated. Thanks Jarda.
Created attachment 94250 [details]
updated once again
I realized that usage of ProxyDeploymentFactory is
- safer (no changes in ServerRegistry/Server)
- does not depend on FO name
I'll integrate changes tomorrow. Fixed in web-main 08f0a4641834. Forgot to add new files :( web-main fc2cfbd72415. Integrated into 'main-golden', will be available in build *201002240200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/08f0a4641834 User: Petr Hejl <phejl@netbeans.org> Log: #148177 org.netbeans.modules.j2ee.deployment classes are loaded on NetBeans startup with LimeWire project (edit) |