[jboss-dev-forums] [Design of POJO Server] - Re: Can you create a MetaValue object without an actual valu

adrian@jboss.org do-not-reply at jboss.com
Mon Feb 11 10:33:36 EST 2008


"bytor99999" wrote : 
  | I have a long workaround that is currently working. However, having the ability to create an empty complex MetaValue object would save a lot of extra work. 
  | 

Yes, but you are trying to solve one problem by subverting another api.

I see this a lot at JBoss recently. It generally leads to hacking one bit
of the system to solve a problem that is elsewhere. But that hack
has knock on effects which leads to more hacks
until finally the whole thing collapses or becomes very ugly.

Fix the original problem rather than doing a quick fix..

In fact, back on topic, in the original OpenType framework, all values are immutable.
You effectively have to "clone" the whole structure to change it.

For the MetaType/Value we've allowed individual values to be mutable,
but it would be waste of memory to have to put an empty MetaValue everywhere
there is a null just so you know what type it is.

You should have the type (the class rather than the instance) somewhere else, 
that's what the types are for, they're the meta description.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128408#4128408

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128408



More information about the jboss-dev-forums mailing list