JEE6IntegrationCapabilitiesCandidates

Candidates for a method in Capabilities class

class org.netbeans.modules.j2ee.dd.impl.ejb.annotation.EjbJarMetadataModelImpl

constructor: 
    if (ddRoot != null && ddRoot.getVersion().doubleValue() < 3.0) {
        root = ddRoot;
    } else {
        root = new EjbJarImpl(helper);
    }

We need to know if EJB is supported in web project, e.g. :

capabilities.isEjbLightSupported();

Suggested implementation:

    public static boolean isEjbLightSupported() {
        J2eeModule j2eeModule = j2eeModuleProvider.getJ2eeModule();
        if (j2eeModule != null) {
            J2eeModule.Type type = j2eeModule.getType();
            if (J2eeModule.Type.WAR.equals(type) && (version >= 3.0)) {
                return true;
            }
        }
        return false;
    }
Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo