Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 347147 - [4.7.1] - JMX MBean names should not be OS-specific
Summary: [4.7.1] - JMX MBean names should not be OS-specific
Status: RESOLVED FIXED
Alias: None
Product: Jetty
Classification: RT
Component: server (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 7.2.x   Edit
Assignee: Greg Wilkins CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-25 09:07 EDT by Michael Golubev CLA
Modified: 2011-05-25 22:05 EDT (History)
2 users (show)

See Also:


Attachments
Screenshot of jconsole on Linux (87.31 KB, image/png)
2011-05-25 09:07 EDT, Michael Golubev CLA
no flags Details
Screenshot of jconsole on Windows (92.48 KB, image/png)
2011-05-25 09:09 EDT, Michael Golubev CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Golubev CLA 2011-05-25 09:07:45 EDT
Created attachment 196545 [details]
Screenshot of jconsole on Linux

Hello, 

I can see JMX MBean names were changed in 7.4.1. Moreover, they differ in Windows and Linux versions of Jetty (see attached screenshots)
- on Windows:
-- if context path is "/" then the ObjectName is like
"org.eclipse.jetty.webapp:type=webappcontext,id=1" (no "name"attribute)
-- if context path is like "/ctx" then the ObjectName is like
"org.eclipse.jetty.webapp:type=webappcontext,name=/ctx,id=1" ("name" attribute starts with "/")

- on Linux:
-- if context path is "/" then the ObjectName is like
"org.eclipse.jetty.webapp:type=webappcontext,name=ROOT,id=1" ("name" attribute is set to "ROOT")
-- if context path is like "/ctx" then the ObjectName is like "org.eclipse.jetty.webapp:type=webappcontext,name=ctx,id=1" ("name" attribute doesn't start with "/")

It's strange to have different behavior here in different OS'es. Is this a bug? Is it subject to change in the nearest future?
Attaching the screenshots of jconsole showing ObjectName when the context path is "/" for Windows and Linux cases.
Comment 1 Michael Golubev CLA 2011-05-25 09:09:07 EDT
Created attachment 196546 [details]
Screenshot of jconsole on Windows
Comment 2 Michael Golubev CLA 2011-05-25 09:15:53 EDT
It might help me if you just tell which of 2 naming conventions above is actually expected and will be preserved in future versions.
Comment 3 Greg Wilkins CLA 2011-05-25 21:41:07 EDT
this is a bug.  We have introduced the name element to be more informative, but it looks like we need to be more consistent with it.
Comment 4 Greg Wilkins CLA 2011-05-25 22:05:03 EDT
The issue was the File.separator was being used instead of "/" for inspecting the context path to determine a name.  Fixed for 7.4.2 and the linux versions of the names will be the final ones.

r3269