[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: setting managed property of type List
adrian@jboss.org
do-not-reply at jboss.com
Wed Dec 12 07:48:13 EST 2007
"alesj" wrote : "adrian at jboss.org" wrote :
| | Generically, we could allow some kind of plugin mechanism to allow
| | somebody to configure:
| | interface -> implementation class or factory
| Even for non collection classes?
| The composite ones.
| Doesn't that defeat the whole purpose of OO? :-)
I don't get the reference to OO? This is reflection/serialization where we've
taken apart the object to split its state into "primitives".
The issue is how do we reconstruct it.
e.g.
| @ManagementProperty
| public void setSomething(Interface i) {}
|
| public interface Interface
| {
| void setInteger(int i);
| void setString(String s);
| }
|
This is a composite with two primitive properties, but we don't know
what the implementation is.
There are two options
1) Create a proxy
http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/trunk/mbeans/src/main/org/jboss/mx/mxbean/CompositeDataInvocationHandler.java?revision=57108&view=markup
2) Allow somebody to define what the implementation class is (or a factory to create one)
The proxy approach doesn't work for collections since they aren't javabeans.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4112241#4112241
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4112241
More information about the jboss-dev-forums
mailing list