This discussion is archived
0 Replies Latest reply: Nov 8, 2012 5:37 PM by 973366 RSS

client-server with  JMX

973366 Newbie
Currently Being Moderated
hi,

I looking for google many time but I dont find an example of solution for my problem. I try to build a server who can exposed a MBean for some clients. For this part it's correct, but when I try to serialize the subclass of my Mbean and I try client-side to chatch them that doesnt work.Do you know how to make that ?


here un example... but it's my structure is correct to support serializable ? ... and how to set server-side to exposed the Child Class to client ?.. i know for the mbean its correct.. but the subclass..

public class helloMBean extends Remote{

public List<Child> getListChild();

}

public class hello implement HelloMBean{

List<Child> lstChild;
String NameParent;

Hello()
     {
NameParent="";
lstChild = new ArrayList<Child>();
}

public List<Child> getListChild(){

return lstChild;
}

public String getParent()
{
return NameParent;
}

public void setParent(String name)
{
NameParent = name;
}

}

public class Child implements Serializable{

String Name;

public Child()
{
...
}

WriteFunction.....

readFunction.....
}

Edited by: user10365284 on 8 nov. 2012 17:29

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points