[ mx4j-Feature Requests-841308 ] Unable to use HTTPAdaptor without registering as an Mbean
"SourceForge.net" <[email protected]>
| Newsgroups | gmane.comp.java.mx4j.devel |
|---|---|
| Message-ID | <[email protected]> |
Feature Requests item #841308, was opened at 2003-11-13 01:58
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=450650&aid=841308&group_id=47745
Category: Tools: HTTP Adaptor
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Unable to use HTTPAdaptor without registering as an Mbean
Initial Comment:
HttpAdaptor cannot be used without being
registered as MBean. Please consider the code below.
MBeanServer mbeanServer =
MBeanServerFactory.createMBeanServer();
ObjectName beanName = new
ObjectName("example:name=greeting");
mbeanServer.registerMBean(new Greeting(), beanName);
ObjectName adaptorName = new
ObjectName("Http:name=HttpAdaptor");
HttpAdaptor had = new HttpAdaptor(8080,"127.0.0.1");
CustomCommandProcessor scp = new
CustomCommandProcessor();
scp.setMBeanServer(mbeanServer);
had.addCommandProcessor("newCommand",
(HttpCommandProcessor)scp);
//mbeanServer.registerMBean(had, adaptorName);
//mbeanServer.invoke(adaptorName, "start", null,
null);
had.start();
However had.start() does not seem to wait at port 8080
and the process ends but if i register this as an mbean
and invoke the start method on that it works(uncomment
the commented portion). So i am forced to add the
adaptor as an Mbean inorder to get this to work.
This issue was raised in the mailing list and it was
suggested that this be raised as an RFE.
Thanks
kaushik
([email protected])
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=450650&aid=841308&group_id=47745
-------------------------------------------------------
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/