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.

View | Details | Raw Unified | Return to bug 180893
Collapse All | Expand All

(-)factory/ide.kit/test/qa-functional/data/whitelist_3.txt (-5 / +4 lines)
Lines 142-155 Link Here
142
org.netbeans.modules.j2ee.deployment.plugins.spi.StartServer
142
org.netbeans.modules.j2ee.deployment.plugins.spi.StartServer
143
org.netbeans.modules.j2ee.deployment.plugins.spi.TargetModuleIDResolver
143
org.netbeans.modules.j2ee.deployment.plugins.spi.TargetModuleIDResolver
144
org.netbeans.modules.j2ee.deployment.plugins.spi.support.ProxyDeploymentFactory
144
org.netbeans.modules.j2ee.deployment.plugins.spi.support.ProxyDeploymentFactory
145
org.netbeans.modules.j2ee.genericserver.ide.GSOptionalDeploymentManagerFactory
145
org.netbeans.modules.j2ee.deployment.plugins.spi.support.ProxyOptionalFactory
146
org.netbeans.modules.j2ee.jboss4.ide.JBOptionalDeploymentManagerFactory
147
org.netbeans.modules.j2ee.sun.api.ServerLocationManager
146
org.netbeans.modules.j2ee.sun.api.ServerLocationManager
148
org.netbeans.modules.j2ee.sun.ide.j2ee.OptionalFactory
147
org.netbeans.modules.j2ee.sun.ide.j2ee.OptionalFactory
149
org.netbeans.modules.j2ee.sun.ide.j2ee.RunTimeDDCatalog
148
org.netbeans.modules.j2ee.sun.ide.j2ee.RunTimeDDCatalog
150
org.netbeans.modules.j2ee.weblogic9.optional.WLOptionalFactory
149
org.netbeans.modules.glassfish.javaee.Hk2DeploymentFactory
151
org.netbeans.modules.tomcat5.TomcatManager$TomcatVersion
150
org.netbeans.modules.glassfish.javaee.Hk2OptionalFactory
152
org.netbeans.modules.tomcat5.ide.OptionalFactory
151
org.netbeans.modules.glassfish.spi.ServerUtilities
153
152
154
#IZ 177644
153
#IZ 177644
155
org.netbeans.modules.schema2beans.AttrProp
154
org.netbeans.modules.schema2beans.AttrProp
(-)factory/j2ee.genericserver/nbproject/project.xml (-1 / +1 lines)
Lines 84-90 Link Here
84
                    <compile-dependency/>
84
                    <compile-dependency/>
85
                    <run-dependency>
85
                    <run-dependency>
86
                        <release-version>4</release-version>
86
                        <release-version>4</release-version>
87
                        <specification-version>1.65</specification-version>
87
                        <specification-version>1.66</specification-version>
88
                    </run-dependency>
88
                    </run-dependency>
89
                </dependency>
89
                </dependency>
90
                <dependency>
90
                <dependency>
(-)factory/j2ee.genericserver/src/org/netbeans/modules/j2ee/genericserver/resources/layer.xml (-2 / +3 lines)
Lines 68-75 Link Here
68
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.J2eePlatformFactory"/>
68
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.J2eePlatformFactory"/>
69
                </file>
69
                </file>
70
                <file name="OptionalFactory.instance">
70
                <file name="OptionalFactory.instance">
71
                    <attr name="instanceCreate" newvalue="org.netbeans.modules.j2ee.genericserver.ide.GSOptionalDeploymentManagerFactory"/>
71
                    <attr name="instanceCreate" methodvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.support.ProxyOptionalFactory.create"/>
72
                    <attr name="instanceClass" stringvalue="org.netbeans.modules.j2ee.genericserver.ide.GSOptionalDeploymentManagerFactory"/>
72
                    <attr name="delegate" newvalue="org.netbeans.modules.j2ee.genericserver.ide.GSOptionalDeploymentManagerFactory"/>
73
                    <attr name="noInitializationFinish" boolvalue="true"/>
73
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory"/>
74
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory"/>
74
                </file>
75
                </file>
75
            </folder>
76
            </folder>
(-)factory/j2ee.jboss4/nbproject/project.xml (-1 / +1 lines)
Lines 122-128 Link Here
122
                    <compile-dependency/>
122
                    <compile-dependency/>
123
                    <run-dependency>
123
                    <run-dependency>
124
                        <release-version>4</release-version>
124
                        <release-version>4</release-version>
125
                        <specification-version>1.65</specification-version>
125
                        <specification-version>1.66</specification-version>
126
                    </run-dependency>
126
                    </run-dependency>
127
                </dependency>
127
                </dependency>
128
                <dependency>
128
                <dependency>
(-)factory/j2ee.jboss4/src/org/netbeans/modules/j2ee/jboss4/resources/layer.xml (-2 / +3 lines)
Lines 69-76 Link Here
69
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.J2eePlatformFactory"/>
69
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.J2eePlatformFactory"/>
70
                </file>
70
                </file>
71
                <file name="OptionalFactory.instance">
71
                <file name="OptionalFactory.instance">
72
                    <attr name="instanceCreate" newvalue="org.netbeans.modules.j2ee.jboss4.ide.JBOptionalDeploymentManagerFactory"/>
72
                    <attr name="instanceCreate" methodvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.support.ProxyOptionalFactory.create"/>
73
                    <attr name="instanceClass" stringvalue="org.netbeans.modules.j2ee.jboss4.ide.JBOptionalDeploymentManagerFactory"/>
73
                    <attr name="delegate" newvalue="org.netbeans.modules.j2ee.jboss4.ide.JBOptionalDeploymentManagerFactory"/>
74
                    <attr name="noInitializationFinish" boolvalue="true"/>
74
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory"/>
75
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory"/>
75
                    <attr name="displayName" bundlevalue="org.netbeans.modules.j2ee.jboss4.Bundle#SERVER_NAME"/>
76
                    <attr name="displayName" bundlevalue="org.netbeans.modules.j2ee.jboss4.Bundle#SERVER_NAME"/>
76
                </file>
77
                </file>
(-)factory/j2eeserver/apichanges.xml (+25 lines)
Lines 113-118 Link Here
113
    <!-- ACTUAL CHANGES BEGIN HERE: -->
113
    <!-- ACTUAL CHANGES BEGIN HERE: -->
114
114
115
    <changes>
115
    <changes>
116
        <change id="optionalFactoryProxy">
117
	    <api name="support"/>
118
	    <summary>
119
                Added class proxying the OptionalDeploymentManagerFactory and adding
120
                the optional noInitializationFinish attribute.
121
	    </summary>
122
	    <version major="1" minor="66"/>
123
	    <date day="25" month="2" year="2010"/>
124
	    <author login="phejl"/>
125
	    <compatibility binary="compatible" source="compatible" semantic="compatible" addition="yes"/>
126
	    <description>
127
                <p>
128
                Added class ProxyOptionalFactory which delegates all calls
129
                to configured delegate. Via noInitializationFinish it
130
                is possible to supress finishInitialization() method when
131
                it is not required by the plugin.
132
                </p>
133
                <p>
134
                Designed to be used from XML Layer.
135
                </p>
136
	    </description>
137
            <class package="org.netbeans.modules.j2ee.deployment.devmodules.spi.support" name="ProxyOptionalFactory"/>
138
            <issue number="180893"/>
139
	 </change>
140
116
        <change id="deploymentFactoryProxy">
141
        <change id="deploymentFactoryProxy">
117
	    <api name="support"/>
142
	    <api name="support"/>
118
	    <summary>
143
	    <summary>
(-)factory/j2eeserver/nbproject/project.properties (-1 / +1 lines)
Lines 39-45 Link Here
39
39
40
is.autoload=true
40
is.autoload=true
41
javac.source=1.6
41
javac.source=1.6
42
spec.version.base=1.65.0
42
spec.version.base=1.66.0
43
43
44
javadoc.arch=${basedir}/arch.xml
44
javadoc.arch=${basedir}/arch.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
(-)factory/j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/spi/support/ProxyOptionalFactory.java (+169 lines)
Line 0 Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
5
 *
6
 * The contents of this file are subject to the terms of either the GNU
7
 * General Public License Version 2 only ("GPL") or the Common
8
 * Development and Distribution License("CDDL") (collectively, the
9
 * "License"). You may not use this file except in compliance with the
10
 * License. You can obtain a copy of the License at
11
 * http://www.netbeans.org/cddl-gplv2.html
12
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
13
 * specific language governing permissions and limitations under the
14
 * License.  When distributing the software, include this License Header
15
 * Notice in each file and include the License file at
16
 * nbbuild/licenses/CDDL-GPL-2-CP.  Sun designates this
17
 * particular file as subject to the "Classpath" exception as provided
18
 * by Sun in the GPL Version 2 section of the License file that
19
 * accompanied this code. If applicable, add the following below the
20
 * License Header, with the fields enclosed by brackets [] replaced by
21
 * your own identifying information:
22
 * "Portions Copyrighted [year] [name of copyright owner]"
23
 *
24
 * If you wish your version of this file to be governed by only the CDDL
25
 * or only the GPL Version 2, indicate your decision by adding
26
 * "[Contributor] elects to include this software in this distribution
27
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
28
 * single choice of license, a recipient has the option to distribute
29
 * your version of this file under either the CDDL, the GPL Version 2 or
30
 * to extend the choice of license to its licensees as provided above.
31
 * However, if you add GPL Version 2 code and therefore, elected the GPL
32
 * Version 2 license, then the option applies only if the new code is
33
 * made subject to such option by the copyright holder.
34
 *
35
 * Contributor(s):
36
 *
37
 * Portions Copyrighted 2010 Sun Microsystems, Inc.
38
 */
39
40
package org.netbeans.modules.j2ee.deployment.plugins.spi.support;
41
42
import java.util.Map;
43
import javax.enterprise.deploy.spi.DeploymentManager;
44
import org.netbeans.modules.j2ee.deployment.plugins.spi.AntDeploymentProvider;
45
import org.netbeans.modules.j2ee.deployment.plugins.spi.DatasourceManager;
46
import org.netbeans.modules.j2ee.deployment.plugins.spi.FindJSPServlet;
47
import org.netbeans.modules.j2ee.deployment.plugins.spi.IncrementalDeployment;
48
import org.netbeans.modules.j2ee.deployment.plugins.spi.JDBCDriverDeployer;
49
import org.netbeans.modules.j2ee.deployment.plugins.spi.MessageDestinationDeployment;
50
import org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory;
51
import org.netbeans.modules.j2ee.deployment.plugins.spi.ServerInitializationException;
52
import org.netbeans.modules.j2ee.deployment.plugins.spi.ServerInstanceDescriptor;
53
import org.netbeans.modules.j2ee.deployment.plugins.spi.StartServer;
54
import org.netbeans.modules.j2ee.deployment.plugins.spi.TargetModuleIDResolver;
55
import org.openide.WizardDescriptor.InstantiatingIterator;
56
import org.openide.util.Parameters;
57
58
/**
59
 * Provides a proxying implementation of {@link OptionalDeploymentManagerFactory}.
60
 * Handles optional <code>noInitializationFinish</code> attribute as a way
61
 * to prevent delegate's {@link #finishServerInitialization()} to be called.
62
 * This can be useful in situation when we want to prevent loading unnecessary
63
 * code (from delegate) being loaded during the {@link #finishServerInitialization()}
64
 * call. Designed to be used via XML layer filesystem.
65
 *
66
 * @author Petr Hejl
67
 * @since 1.66
68
 */
69
public final class ProxyOptionalFactory extends OptionalDeploymentManagerFactory {
70
71
    private final Map attributes;
72
73
    private final boolean noInitializationFinish;
74
75
    /* GuardedBy("this") */
76
    private OptionalDeploymentManagerFactory delegate;
77
78
    private ProxyOptionalFactory(Map attributes) {
79
        this.attributes = attributes;
80
81
        Boolean finish = (Boolean) attributes.get("noInitializationFinish"); // NOI18N
82
        this.noInitializationFinish = finish == null ? false : finish.booleanValue();
83
    }
84
85
    public static ProxyOptionalFactory create(Map map) {
86
        return new ProxyOptionalFactory(map);
87
    }
88
89
    @Override
90
    public boolean isCommonUIRequired() {
91
        return getDelegate().isCommonUIRequired();
92
    }
93
94
    @Override
95
    public TargetModuleIDResolver getTargetModuleIDResolver(DeploymentManager dm) {
96
        return getDelegate().getTargetModuleIDResolver(dm);
97
    }
98
99
    @Override
100
    public StartServer getStartServer(DeploymentManager dm) {
101
        return getDelegate().getStartServer(dm);
102
    }
103
104
    @Override
105
    public ServerInstanceDescriptor getServerInstanceDescriptor(DeploymentManager dm) {
106
        return getDelegate().getServerInstanceDescriptor(dm);
107
    }
108
109
    @Override
110
    public MessageDestinationDeployment getMessageDestinationDeployment(DeploymentManager dm) {
111
        return getDelegate().getMessageDestinationDeployment(dm);
112
    }
113
114
    @Override
115
    public JDBCDriverDeployer getJDBCDriverDeployer(DeploymentManager dm) {
116
        return getDelegate().getJDBCDriverDeployer(dm);
117
    }
118
119
    @Override
120
    public IncrementalDeployment getIncrementalDeployment(DeploymentManager dm) {
121
        return getDelegate().getIncrementalDeployment(dm);
122
    }
123
124
    @Override
125
    public FindJSPServlet getFindJSPServlet(DeploymentManager dm) {
126
        return getDelegate().getFindJSPServlet(dm);
127
    }
128
129
    @Override
130
    public DatasourceManager getDatasourceManager(DeploymentManager dm) {
131
        return getDelegate().getDatasourceManager(dm);
132
    }
133
134
    @Override
135
    public AntDeploymentProvider getAntDeploymentProvider(DeploymentManager dm) {
136
        return getDelegate().getAntDeploymentProvider(dm);
137
    }
138
139
    @Override
140
    public InstantiatingIterator getAddInstanceIterator() {
141
        return getDelegate().getAddInstanceIterator();
142
    }
143
144
    @Override
145
    public void finishServerInitialization() throws ServerInitializationException {
146
        if (!noInitializationFinish) {
147
            getDelegate().finishServerInitialization();
148
        }
149
    }
150
151
    private OptionalDeploymentManagerFactory getDelegate() {
152
        synchronized (this) {
153
            if (delegate != null) {
154
                return delegate;
155
            }
156
        }
157
158
        OptionalDeploymentManagerFactory factory = (OptionalDeploymentManagerFactory) attributes.get("delegate"); // NOI18N
159
        Parameters.notNull("delegate", factory);  // NOI18N
160
        
161
        synchronized (this) {
162
            if (delegate == null) {
163
                delegate = factory;
164
            }
165
            return delegate;
166
        }
167
    }
168
169
}
(-)factory/j2ee.weblogic9/nbproject/project.xml (-1 / +1 lines)
Lines 110-116 Link Here
110
                    <compile-dependency/>
110
                    <compile-dependency/>
111
                    <run-dependency>
111
                    <run-dependency>
112
                        <release-version>4</release-version>
112
                        <release-version>4</release-version>
113
                        <specification-version>1.65</specification-version>
113
                        <specification-version>1.66</specification-version>
114
                    </run-dependency>
114
                    </run-dependency>
115
                </dependency>
115
                </dependency>
116
                <dependency>
116
                <dependency>
(-)factory/j2ee.weblogic9/src/org/netbeans/modules/j2ee/weblogic9/resources/layer.xml (-2 / +3 lines)
Lines 103-110 Link Here
103
                    etc.
103
                    etc.
104
                -->
104
                -->
105
                <file name="OptionalFactory.instance">
105
                <file name="OptionalFactory.instance">
106
                    <attr name="instanceCreate" newvalue="org.netbeans.modules.j2ee.weblogic9.optional.WLOptionalFactory"/>
106
                    <attr name="instanceCreate" methodvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.support.ProxyOptionalFactory.create"/>
107
                    <attr name="instanceClass" stringvalue="org.netbeans.modules.j2ee.weblogic9.optional.WLOptionalFactory"/>
107
                    <attr name="delegate" newvalue="org.netbeans.modules.j2ee.weblogic9.optional.WLOptionalFactory"/>
108
                    <attr name="noInitializationFinish" boolvalue="true"/>
108
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory"/>
109
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory"/>
109
                    <attr name="displayName" bundlevalue="org.netbeans.modules.j2ee.weblogic9.Bundle#TXT_displayName"/>
110
                    <attr name="displayName" bundlevalue="org.netbeans.modules.j2ee.weblogic9.Bundle#TXT_displayName"/>
110
                </file>
111
                </file>
(-)factory/tomcat5/nbproject/project.xml (-1 / +1 lines)
Lines 155-161 Link Here
155
                    <compile-dependency/>
155
                    <compile-dependency/>
156
                    <run-dependency>
156
                    <run-dependency>
157
                        <release-version>4</release-version>
157
                        <release-version>4</release-version>
158
                        <specification-version>1.65</specification-version>
158
                        <specification-version>1.66</specification-version>
159
                    </run-dependency>
159
                    </run-dependency>
160
                </dependency>
160
                </dependency>
161
                <dependency>
161
                <dependency>
(-)factory/tomcat5/src/org/netbeans/modules/tomcat5/resources/layer.xml (-6 / +9 lines)
Lines 59-66 Link Here
59
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.RegistryNodeFactory"/>
59
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.RegistryNodeFactory"/>
60
                </file>
60
                </file>
61
                <file name="OptionalFactory.instance">
61
                <file name="OptionalFactory.instance">
62
                    <attr name="instanceCreate" methodvalue="org.netbeans.modules.tomcat5.ide.OptionalFactory.create50"/>
62
                    <attr name="instanceCreate" methodvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.support.ProxyOptionalFactory.create"/>
63
                    <attr name="instanceClass" stringvalue="org.netbeans.modules.tomcat5.ide.OptionalFactory"/>
63
                    <attr name="delegate" methodvalue="org.netbeans.modules.tomcat5.ide.OptionalFactory.create50"/>
64
                    <attr name="noInitializationFinish" boolvalue="true"/>
64
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory"/>
65
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory"/>
65
                    <attr name="displayName" bundlevalue="org.netbeans.modules.tomcat5.Bundle#LBL_TomcatFactory"/>
66
                    <attr name="displayName" bundlevalue="org.netbeans.modules.tomcat5.Bundle#LBL_TomcatFactory"/>
66
                </file>
67
                </file>
Lines 94-101 Link Here
94
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.RegistryNodeFactory"/>
95
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.RegistryNodeFactory"/>
95
                </file>
96
                </file>
96
                <file name="OptionalFactory55.instance">
97
                <file name="OptionalFactory55.instance">
97
                    <attr name="instanceCreate" methodvalue="org.netbeans.modules.tomcat5.ide.OptionalFactory.create55"/>
98
                    <attr name="instanceCreate" methodvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.support.ProxyOptionalFactory.create"/>
98
                    <attr name="instanceClass" stringvalue="org.netbeans.modules.tomcat5.ide.OptionalFactory"/>
99
                    <attr name="delegate" methodvalue="org.netbeans.modules.tomcat5.ide.OptionalFactory.create55"/>
100
                    <attr name="noInitializationFinish" boolvalue="true"/>
99
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory"/>
101
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory"/>
100
                    <attr name="displayName" bundlevalue="org.netbeans.modules.tomcat5.Bundle#LBL_TomcatFactory55"/>
102
                    <attr name="displayName" bundlevalue="org.netbeans.modules.tomcat5.Bundle#LBL_TomcatFactory55"/>
101
                </file>
103
                </file>
Lines 129-136 Link Here
129
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.RegistryNodeFactory"/>
131
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.RegistryNodeFactory"/>
130
                </file>
132
                </file>
131
                <file name="OptionalFactory60.instance">
133
                <file name="OptionalFactory60.instance">
132
                    <attr name="instanceCreate" methodvalue="org.netbeans.modules.tomcat5.ide.OptionalFactory.create60"/>
134
                    <attr name="instanceCreate" methodvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.support.ProxyOptionalFactory.create"/>
133
                    <attr name="instanceClass" stringvalue="org.netbeans.modules.tomcat5.ide.OptionalFactory"/>
135
                    <attr name="delegate" methodvalue="org.netbeans.modules.tomcat5.ide.OptionalFactory.create60"/>
136
                    <attr name="noInitializationFinish" boolvalue="true"/>
134
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory"/>
137
                    <attr name="instanceOf" stringvalue="org.netbeans.modules.j2ee.deployment.plugins.spi.OptionalDeploymentManagerFactory"/>
135
                    <attr name="displayName" bundlevalue="org.netbeans.modules.tomcat5.Bundle#LBL_TomcatFactory60"/>
138
                    <attr name="displayName" bundlevalue="org.netbeans.modules.tomcat5.Bundle#LBL_TomcatFactory60"/>
136
                </file>
139
                </file>

Return to bug 180893