Results 1 to 1 of 1

Thread: Managing Collection of Objects

  1. #1
    Join Date
    Oct 2008
    Posts
    1

    Default Managing Collection of Objects

    Hello,

    I'm quite new to Spring and JMX and I want to know if its possible to manage a Collection of objects (especially Collection of String) using JMX.

    To specify, i got an MBean and an annotated getter/setter pair:

    Code:
    	@ManagedAttribute
    	public List<String> getMyList() {
    		return myList;
    	}
    	
    	@ManagedAttribute(persistPolicy="OnUpdate")
    	public void setMyList(List<String> myList) {
    		this.myList = myList;
    	}
    This works fine for the getter but i didn't find a way for invoking the setter.

    Sure i could provide my own "add"-Method and annotate it as JMX Operation to modify the items but my persistence Interceptor is not called that way.

    Any ideas?

    Thanks,

    Thomas Pietsch
    Last edited by T.Pietsch; Oct 15th, 2008 at 03:53 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •