CPD Results

The following document contains the results of PMD's CPD 3.7.

Duplications

FileLine
org/apache/geronimo/deployment/plugin/jmx/JMXDeploymentManager.java282
org/apache/geronimo/deployment/plugin/DisconnectedDeploymentManager.java49
    public DeploymentConfiguration createConfiguration(DeployableObject dObj) throws InvalidModuleException {
        if(dObj.getType().equals(ModuleType.CAR)) {
            //todo: need a client configurer
        } else if(dObj.getType().equals(ModuleType.EAR)) {
            //todo: need an EAR configurer
        } else if(dObj.getType().equals(ModuleType.EJB)) {
            try {
                Class cls = Class.forName("org.apache.openejb.deployment.EJBConfigurer");
                return (DeploymentConfiguration)cls.getMethod("createConfiguration", new Class[]{DeployableObject.class}).invoke(cls.newInstance(), new Object[]{dObj});
            } catch (Exception e) {
                log.error("Unable to invoke EJB deployer", e);
            }
        } else if(dObj.getType().equals(ModuleType.RAR)) {
            return new RARConfigurer().createConfiguration(dObj);
        } else if(dObj.getType().equals(ModuleType.WAR)) {
            return new WARConfigurer().createConfiguration(dObj); // this is jetty
            // todo: Tomcat WARConfigurer
        }
        throw new InvalidModuleException("Not supported");
    }