We can have SimpleType values like SimpleType.INTEGER, SimpleType.STRING in a CompositeData. I want nested composite type i.e. a composite type containing another composite type.
I am using the code below to perform that. But it does not displays the CompositeData in the JConsole. What it displays for me is the metadata of the CompositeData and not the real data.
Please tell me a way to counter the problem.
CompositeType type = new CompositeType("My Type", "My Type", new String[]{"item1", "item2"}, new String[]{"item1", "item2"}, new OpenType[]{SimpleType.STRING, SimpleType.STRING});
CompositeData data = new CompositeDataSupport(type, new String[]{"item1", "item2"}, new String[]{"item value 1", "item value 2"});
CompositeType compType = new CompositeType("compData", "compData", new String[]{"compItem1"}, new String[]{"compItem1"}, new OpenType[]{type});
CompositeData compData = new CompositeDataSupport(compType, new String[]{"compItem1"}, new Object[]{data});