Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
2683 | minor | always | 05-19-08 16:44 | 06-05-08 15:59 | |
|
|||||
Reporter: | ferg | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | 3.1.6 | ||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 3.2.0 | ||
|
|||||
Summary: | 0002683: ports available in servlet init | ||||
Description: |
(rep by Vinod Mehra) ResinMXBean resinMXBean = Resin.getCurrent().getAdmin(); // perhaps mbean lookup will be better if (resinMXBean == null) throw new IllegalStateException("ResinMXBean not initialized yet"); PortMXBean[] ports = serverMXBean.getPorts(); if (ports == null || ports.length < 1) return -1; for (PortMXBean port : ports) { if (port.getProtocolName().equals("http")) return port.getPort(); } return -1; Also I moved the initialization to servlet-context listener. But it doesn't work. The reason is com.caucho.server.cluster.Server is initialized only after the listeners, filters and servlets etc are initialized. Is there anyother way I can find the port number? |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|