Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » JMX and Spring bean
JMX and Spring bean [message #654796] Thu, 17 February 2011 08:20 Go to next message
Dan Tran is currently offline Dan TranFriend
Messages: 24
Registered: February 2011
Junior Member
For the classic Spring bean app, i can just annotate my spring bean classes and methods to add JMX functionanality ( so that I can invoke from jconsole ). However, when deploy my spring bean as a bundle to Virgo I dont see my JMX bean shows up in Jconsole.

Would it possible to do that with Virgo?

Big thanks aheahd

-Dan
Re: JMX and Spring bean [message #654805 is a reply to message #654796] Thu, 17 February 2011 09:10 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
That should certainly be possible because that's how Virgo publishes some of its own Mxbeans. Take a look at the Deployer interface.

The deployer runs in the kernel rather than the user region, but the user region runs its own instance of Spring framework, so I don't think that's the issue.
Re: JMX and Spring bean [message #655018 is a reply to message #654805] Fri, 18 February 2011 01:11 Go to previous messageGo to next message
Dan Tran is currently offline Dan TranFriend
Messages: 24
Registered: February 2011
Junior Member
I found org.eclipse.virgo.apps.repository has and implementation of MBean. However, the source manually register the bean.

I was hoping i could find some thing like

@ManagedResource(objectName = "com.mycomp.mc:name=helloWorld", description = "Hello World Via Spring DM.")
public class ExampleService
implements Service {

/**
* Reads next record from input
*/
@ManagedOperation(description = "Hello World!")
public String getMessage() {
return "Hello world!";
}

}

Btw, I also export ExampleService as bundle service bean and it does not help either

Big thanks ahead for advices

-D

[Updated on: Fri, 18 February 2011 01:35]

Report message to a moderator

Re: JMX and Spring bean [message #655109 is a reply to message #655018] Fri, 18 February 2011 11:06 Go to previous messageGo to next message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
I don't think we use that approach in Virgo itself.

Please note we have a new source code search facility available for Virgo: http://virgo-opengrok.springsource.org/.

For instance, to find where we publish the Deployer mxbean, enter "Deployer jmx" in the Full Search box and "xml virgo" in the File Path box.
Re: JMX and Spring bean [message #656659 is a reply to message #655109] Mon, 28 February 2011 01:25 Go to previous messageGo to next message
Dan Tran is currently offline Dan TranFriend
Messages: 24
Registered: February 2011
Junior Member
I ended up to register my Spring beans with MBeanExporter

The below link shows how to to do it

http://tech-tauk.blogspot.com/2009/11/jmx-using-spring.html

-Dan

[Updated on: Mon, 28 February 2011 01:26]

Report message to a moderator

Re: JMX and Spring bean [message #656699 is a reply to message #656659] Mon, 28 February 2011 08:08 Go to previous message
Glyn Normington is currently offline Glyn NormingtonFriend
Messages: 1222
Registered: July 2009
Senior Member
Glad you found a way through.
Previous Topic:Problems using Virgo Test Framework
Next Topic:Milestone 3.0.0.M02 is available
Goto Forum:
  


Current Time: Mon Dec 22 04:28:01 GMT 2014

Powered by FUDForum. Page generated in 0.01775 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software