Anonymous | Login | Signup for a new account | 12-17-2024 10:51 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Advanced Details [ Jump to Notes ] | [ View Simple ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0002683 | [Resin] | minor | always | 05-19-08 16:44 | 06-05-08 15:59 | ||||
Reporter | ferg | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | Platform | |||||
Status | closed | OS | |||||||
Projection | none | OS Version | |||||||
ETA | none | Fixed in Version | 3.2.0 | Product Version | 3.1.6 | ||||
Product Build | |||||||||
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 | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed. 25 unique queries executed. |