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 236762 - Unable to change location port number without deleting and re-registering server
Summary: Unable to change location port number without deleting and re-registering server
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 8.0
Hardware: PC Mac OS X
: P3 normal (vote)
Assignee: TomasKraus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-04 13:05 UTC by jjuneau
Modified: 2013-10-10 02:20 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jjuneau 2013-10-04 13:05:38 UTC
If changing the port number from within the GlassFish administration console, the change is not reflected within he IDE connection.  Therefore, when using the "NetBeans Connector", the incorrect port number is used and no page is rendered within the browser. 

In order to change the port number with the IDE, one must delete the server connection and re-register within NetBeans.
Comment 1 TomasKraus 2013-10-04 13:09:47 UTC
Yes, it works this way for years.
Marking as RFE.
Comment 2 jjuneau 2013-10-04 13:18:07 UTC
Thanks, just an annoyance, I guess.  We oftentimes change the port number if we are trying to run multiple versions of GlassFish or other servers.  I appreciate you marking it as a RFE.
Comment 3 TomasKraus 2013-10-07 13:33:48 UTC
Checked into web-main:
----------------------
changeset:   264675:faeeb1791be1
summary:     #236762 - XML praser refactoring

Did some clean up in XML parser to separate it from big bags of everything in common and spi.

I did some debugging so see how HTTP ports are initialized in plugin.
There is domain.xml parser which retrieves HTTP port from listeners configuration stored in domain.xml when server instance object is being initialized. But guess this value is not changed since that.

I would like to ask you to try something:
1) Run NetBeans with GF registered.
2) Change GF listener to use another port
3) Restart NetBeans

Let me know if HTTP port gets updated after NetBeans restart. If so, my findings are correct and I may just implement some 'refresh' to read port values from domain.xml again on user's request.
Comment 4 TomasKraus 2013-10-09 13:38:36 UTC
Checked into web-main:
----------------------
changeset:   264676:5a9416252c08
summary:     #236762 - Automatic domain.xml changes detection and ports properties update.

Added file change listener on domain.xml. Currently it only uses existing code to parse domain.xml and update HTTP and admin port properties.

It may take some time from GF admin console change save to NB properties update because file change event is not generated immediately.
Comment 5 TomasKraus 2013-10-09 15:54:03 UTC
Pushing in.

Testing:
--------
Keep in mind that it may take few minutes for NetBeans to detect domain.xml change and update server properties.

There will be INFO message in NB log after domain.xml change is detected:
 * GlassFish configuration file {0} was modified, updating server configuration.
   {0} is full path to domain.xml
Comment 6 Quality Engineering 2013-10-10 02:20:50 UTC
Integrated into 'main-silver', will be available in build *201310100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/faeeb1791be1
User: Tomas Kraus <TomasKraus@netbeans.org>
Log: #236762 - XML praser refactoring