fix for 166017

Vince Kraemer <[email protected]>
Newsgroups gmane.comp.java.netbeans.reviewers
Message-ID <[email protected]>
http://www.netbeans.org/issues/show_bug.cgi?id=166017

There is a pathway to the content of the j2eeserver ServerRegistry which 
does not initialize the default GlassFish v3 server, so the user cannot 
select that server as a target for a project.

The work-around (expand the servers node) before creating a project is 
not intuitive.

The code for registering/creating the default server instance has been 
factored to be extremely lazy.  The code in j2eeserver has been factored 
to be extremely lazy, so there is a high likelyhood that users will run 
into a dead lock, since the initialization of both registries may hold 
locks that the other needs.

By moving the initialization of the GlassfishInstanceProvider objects 
into the restored() method for the glassfish.common module, the chance 
of both registries being incomplete and competing for locks is eliminated.

The j2eeserver registry will be populated with v3 instances as the 
glassfish.javaee module initializes, which happens after the 
initialization of glassfish.common and before the user can trigger the 
new project wizard...

the changeset is referenced in 
http://www.netbeans.org/issues/show_bug.cgi?id=166017#desc13
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.