Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 346894

Summary: multiple instances of jetty not handled correctly by WTP
Product: [RT] Jetty Reporter: will_lauer
Component: wtpAssignee: Jesse McConnell <jesse.mcconnell>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jetty-inbox
Version: unspecified   
Target Milestone: 7.2.x   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Patch to correct port handling and allow multiple jetty's inside WTP jesse.mcconnell: iplog+

Description will_lauer CLA 2011-05-23 13:10:57 EDT
Created attachment 196361 [details]
Patch to correct port handling and allow multiple jetty's inside WTP

The Jetty WTP plugin doesn't handle multiple instances of jetty correctly, resulting in port conflicts and problems starting or stopping instances of the jetty server. The problem appears to be an assumption that the Jetty STOP port will always be port 8082. If more than one jetty is run, only the first can bind to that port. All the rest will generate errors about the port being in use. Stopping any jetty other than the first instance will cause the first instance to be stopped, then wait. Eventually an error pops up saying that the instance failed to stop and allows you to just terminate the JVM.

The solution (patch attched) appears to be to modify how port handling is done, declaring a special "admin" port that can be manipulated via the port UI. The attached patch allows the admin port to be modified, persists the value to the server directory, and then uses that port when starting or stopping jetty JVM's, thus allowing multiple simultaneous jetty instances to be run, debugged, etc.
Comment 1 Jesse McConnell CLA 2011-06-17 09:51:39 EDT
applied, thanks!