diff -r 651ae65cac3d glassfish.javaee/nbproject/project.xml --- a/glassfish.javaee/nbproject/project.xml Mon Oct 03 01:30:04 2011 +0200 +++ b/glassfish.javaee/nbproject/project.xml Mon Oct 03 16:50:29 2011 +0200 @@ -163,7 +163,7 @@ 4 - 1.74 + 1.86 diff -r 651ae65cac3d glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2OptionalFactory.java --- a/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2OptionalFactory.java Mon Oct 03 01:30:04 2011 +0200 +++ b/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/Hk2OptionalFactory.java Mon Oct 03 16:50:29 2011 +0200 @@ -320,12 +320,6 @@ InstanceProperties.removeInstance(url); } } - // -// final boolean needToRegisterDefaultServer = -// !NbPreferences.forModule(this.getClass()).getBoolean(ServerUtilities.PROP_FIRST_RUN, false); -// if (needToRegisterDefaultServer) { -// commonUtilities.getServerProvider(); -// } } catch (Exception ex) { throw new ServerInitializationException("failed to init default instance", ex); } diff -r 651ae65cac3d glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/layer.xml --- a/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/layer.xml Mon Oct 03 01:30:04 2011 +0200 +++ b/glassfish.javaee/src/org/netbeans/modules/glassfish/javaee/layer.xml Mon Oct 03 16:50:29 2011 +0200 @@ -37,8 +37,9 @@ - - + + + @@ -75,8 +76,9 @@ - - + + + diff -r 651ae65cac3d ide.kit/test/qa-functional/data/whitelist_3.txt --- a/ide.kit/test/qa-functional/data/whitelist_3.txt Mon Oct 03 01:30:04 2011 +0200 +++ b/ide.kit/test/qa-functional/data/whitelist_3.txt Mon Oct 03 16:50:29 2011 +0200 @@ -199,11 +199,6 @@ org.netbeans.modules.j2ee.persistenceapi.PersistenceScopeAccessor org.netbeans.modules.j2ee.persistenceapi.PersistenceScopesAccessor -#IZ 200049 -org.netbeans.modules.glassfish.common.wizards.GlassfishWizardProvider -org.netbeans.modules.glassfish.javaee.Hk2DeploymentFactory -org.netbeans.modules.glassfish.javaee.Hk2OptionalFactory -org.netbeans.modules.glassfish.spi.ServerUtilities org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment org.netbeans.modules.j2ee.deployment.devmodules.api.J2eeModule org.netbeans.modules.j2ee.deployment.devmodules.api.J2eeModule$Type diff -r 651ae65cac3d j2eeserver/apichanges.xml --- a/j2eeserver/apichanges.xml Mon Oct 03 01:30:04 2011 +0200 +++ b/j2eeserver/apichanges.xml Mon Oct 03 16:50:29 2011 +0200 @@ -116,6 +116,31 @@ + + + + Added noInitializationFinishWhenNoInstances attribute of + ProxyOptionalFactory. + + + + + + +

+ In ProxyOptionalFactory you can use the new attribute + noInitializationFinishWhenNoInstances to suppress invocation + of finishServerInitialization() when there are no instances + in the server registry. +

+

+ Designed to be used from XML Layer. +

+
+ + +
+ diff -r 651ae65cac3d j2eeserver/nbproject/project.properties --- a/j2eeserver/nbproject/project.properties Mon Oct 03 01:30:04 2011 +0200 +++ b/j2eeserver/nbproject/project.properties Mon Oct 03 16:50:29 2011 +0200 @@ -42,7 +42,7 @@ is.autoload=true javac.source=1.6 -spec.version.base=1.85.0 +spec.version.base=1.86.0 javadoc.arch=${basedir}/arch.xml javadoc.apichanges=${basedir}/apichanges.xml diff -r 651ae65cac3d j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/spi/support/ProxyOptionalFactory.java --- a/j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/spi/support/ProxyOptionalFactory.java Mon Oct 03 01:30:04 2011 +0200 +++ b/j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/spi/support/ProxyOptionalFactory.java Mon Oct 03 16:50:29 2011 +0200 @@ -44,6 +44,7 @@ import java.util.Map; import javax.enterprise.deploy.spi.DeploymentManager; +import org.netbeans.modules.j2ee.deployment.impl.ServerRegistry; import org.netbeans.modules.j2ee.deployment.plugins.spi.AntDeploymentProvider; import org.netbeans.modules.j2ee.deployment.plugins.spi.DatasourceManager; import org.netbeans.modules.j2ee.deployment.plugins.spi.FindJSPServlet; @@ -74,6 +75,8 @@ private final Map attributes; private final boolean noInitializationFinish; + + private final boolean noInitializationFinishWhenNoInstances; /* GuardedBy("this") */ private OptionalDeploymentManagerFactory delegate; @@ -83,6 +86,8 @@ this.noInitializationFinish = Boolean.TRUE.equals( attributes.get("noInitializationFinish")); // NOI18N + this.noInitializationFinishWhenNoInstances = Boolean.TRUE.equals( + attributes.get("noInitializationFinishWhenNoInstances")); // NOI18N } public static ProxyOptionalFactory create(Map map) { @@ -147,7 +152,10 @@ @Override public void finishServerInitialization() throws ServerInitializationException { if (!noInitializationFinish) { - getDelegate().finishServerInitialization(); + if (!noInitializationFinishWhenNoInstances + || !ServerRegistry.getInstance().getInstances().isEmpty()) { + getDelegate().finishServerInitialization(); + } } }