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.
Summary: | GlassFish registration removed after restart when registered by installer | ||
---|---|---|---|
Product: | serverplugins | Reporter: | Jiri Skrivanek <jskrivanek> |
Component: | GlassFish | Assignee: | TomasKraus |
Status: | VERIFIED FIXED | ||
Severity: | normal | CC: | -Silver-, anebuzelsky, jrechtacek, mmirilovic, pjiricka, stezeb |
Priority: | P1 | ||
Version: | 8.0 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: | the patch |
Description
Jiri Skrivanek
2014-01-13 10:21:53 UTC
Tomas, please evaluate ASAP (today!) and let us know .... otherwise we will release 8.0 with this bug, thanks in advance. A problem is related to preferences of glassfish module, stored in file <userdir>/config/Preferences/org/netbeans/modules/glassfish/common.properties If the file found in the userdir, GF4 server is not in Services tab. When I removed the file and restarted IDE, the GF4 was back in Services tab. After next restart will disappear again and so on. Btw. it's reproducible on latest Dev build on Windows and on Mac too. I think I've found a fix. If my assumptions are correct this used to work only by accident in 7.4. Basically there is a logic which for some reason copy the data from autoregistered instance file to a regular one and saving the mark it has been done. There is also logic that prevents duplicated instance files. In 7.4 the autoregistered instance was in folder GlassFishEE6WC and the regular instance file was created in GlassFishEE6 in userdir. In dev the autoregistered instance is in folder GlassFishEE6 and the regular instance file is going to be created in GlassFishEE6 in userdir. So the duplication prevention code takes place and the instance is not stored in user dir, but marked as copied. I believe the attached patch could solve the issue though I'm not sure about possible side effects - the GF code is too complex. Created attachment 143924 [details]
the patch
Fixed in web-main add2166c0cda. Fixed in 8.0_beta - http://hg.netbeans.org/releases/rev/d6258d35641d Fix looks good. Values of instance.url and instance.name are unique so this shall be working. I would just replace instanceFOs[i].getAttribute(GlassfishModule.URL_ATTR)) with instanceFOs[i].getUrl(). I made all those getters and setters to hide backend map and to allow getting rid of it in the future. But it's just a cosmetic change so it's up to you. Verified in NetBeans IDE 8.0 Beta (Build 201401141042). |