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.

Bug 68202 - Extraneous init call to old DeploymentConfiguration when switching servers.
Summary: Extraneous init call to old DeploymentConfiguration when switching servers.
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Sherold Dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-07 10:17 UTC by _ pcw
Modified: 2005-11-08 12:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ pcw 2005-11-07 10:17:35 UTC
When switching servers, j2eeserver calls initConfiguration() to initialize a
second DeploymentConfiguration on the OLD server.  I don't think this is correct.

To reproduce, pick a server, put a breakpoint or println in the init routine for
that server's plugin (I used SJSAS, of course, and checked both Web Projects and
EjbProjects).

Then run, note the first (correct) initialization when the project is loaded or
created.  Then switch servers to another server (e.g SJSAS -> Tomcat or JBoss).
 There will be a second init call caused by the ensureConfigurationReady() calls
in J2eeModuleProvider.fireServerChange(), which are sent to the old server
plugin when it appears they had been intended for the new one.

If somehow this behavior is correct, we may need to upgrade the API, and we do
need to document the lifecyle of a DeploymentConfiguration better.  In this
case, there are two DeploymentConfiguration's in existence simultaneously for a
period of time, which implies duplicate DConfigBeans and all the bad news that
goes with that, as well as some other shortcomings I can enumerate if it becomes
necessary.
Comment 1 Sherold Dev 2005-11-07 16:56:03 UTC
TM -> 5.0
Comment 2 Sherold Dev 2005-11-08 12:23:24 UTC
The problem was that the ear project never fired server change event. The
problem with ejbjar and web projects was that the server change event was fired
before server instance ID had been updated to the new value.

Peter, please feel free to reopen this issue, if your problems persist.

Thanks

F.

Checking in src/org/netbeans/modules/web/project/ProjectWebModule.java;
/cvs/web/project/src/org/netbeans/modules/web/project/ProjectWebModule.java,v 
<--  ProjectWebModule.java
new revision: 1.44; previous revision: 1.43
done

Checking in src/org/netbeans/modules/j2ee/earproject/ProjectEar.java;
/cvs/j2ee/earproject/src/org/netbeans/modules/j2ee/earproject/ProjectEar.java,v
 <--  ProjectEar.java
new revision: 1.13; previous revision: 1.12
done

Checking in src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProvider.java;
/cvs/j2ee/ejbjarproject/src/org/netbeans/modules/j2ee/ejbjarproject/EjbJarProvider.java,v
 <--  EjbJarProvider.java
new revision: 1.29; previous revision: 1.28
done