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.
According to Whitelist test 3 the following modules are loaded on startup with JavaSE project: org.netbeans.modules.j2ee.api.ejbjar.Car org.netbeans.modules.j2ee.api.ejbjar.EjbJar org.netbeans.modules.j2ee.ejbjar.CarAccessor org.netbeans.modules.j2ee.ejbjar.EjbJarAccessor org.netbeans.modules.j2ee.spi.ejbjar.CarProvider org.netbeans.modules.j2ee.spi.ejbjar.CarsInProject org.netbeans.modules.j2ee.spi.ejbjar.EjbJarProvider org.netbeans.modules.j2ee.spi.ejbjar.EjbJarsInProject details are available at: http://deadlock.netbeans.org/hudson/job/ergonomics/
When fixed please remove the classes from whitelist added by http://hg.netbeans.org/ergonomics/rev/6bcc4d4b6c11
It's same situation like in the issue #204449. I checked reported classes and all of them are loaded by CdiAnalysisResult.getBeansTargetFolder() method as well. This method looks to be called because of looking for beans.xml in the project. So I don't see anything what could be done on EJB side here. Probably the only solution would be to not use EJB, WEB APIs for checking of enbaled CDI, but don't know it's possible or not. Denis?
(In reply to comment #2) > It's same situation like in the issue #204449. I checked reported classes and > all of them are loaded by CdiAnalysisResult.getBeansTargetFolder() method as > well. This method looks to be called because of looking for beans.xml in the > project. So I don't see anything what could be done on EJB side here. Probably > the only solution would be to not use EJB, WEB APIs for checking of enbaled > CDI, but don't know it's possible or not. Denis? getBeansTargetFolder() could be used in many ways. But I believe the main issue is usage its via static "isCdiEnabled" method inside CdiOpenHook. The latter class has no any other purpose except CDI tracking usage. It was added some time ago to handle request for usage tracking. The latter class could be refactored actually to avoid reusing common method CdiAnalysisResult.isCdiEnabled(). One need to create 4 classes for each project type and implement method getBeansTargetFolder() based on target project type. I'm reassigning this issue to myself.
isCdiEnabled() method logic is localized for now in the class which will be load only per specific project type. It eliminates need of unnecessarily class loading. Unfortunately there is a bug in the lookup infrastructure that require loading two classes instead of one. So I still need ProjectopenHook impl class and usage logging class. web-main#50793f496510
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/50793f496510 User: Denis Anisimov <ads@netbeans.org> Log: Fix for BZ#204445 - ejbjar classes are loaded at startup