[jboss-dev-forums] [Design of POJO Server] - Re: xml persistent format for attachments
emuckenhuber
do-not-reply at jboss.com
Sat Nov 22 12:18:55 EST 2008
"scott.stark at jboss.org" wrote :
| That is what is happening already though since the input is the ManagedComponent that was updated. We would only be writing out properties that have non-null values. I suppose this should go further and only write out properties that were explicitly updated, is that what you mean? We would need an isEdited flag on ManagedProperty for that.
|
Well i do persist everything. Also null values, because i think it should be possible to change the value to null (e.g. for a String) ?
What i mean is more or less a isEdited flag - so that i can differentiate between values which are from the original deployment descriptor
(which do not need to be persisted) and changed values.
At the moment letting that run over a ManagedComponentFactoryDeployment i get a 10 times bigger attachment as the original deployment descriptor ;)
This is also because of some additional information and a more generic xml structure.
Most probably can remove some additional information as the marshalling/unmarshalling heavily depends on the created ManagedObject with MetaTypes anyway - i'll take a look at that when it's done.
And i think we also need a isRemoved flag for the ManagedProperty.
e.g. if you have a list of properties and you want to remove one property
we would need to persist that too and remove that when updating the persisted attachment...
"scott.stark at jboss.org" wrote :
| I don't follow. For a KernelDeployment for an mcbeans deployment, there is:
| ManagedObject(KernelDeployment)
| + beanFactories = ManagedObject[](BeanMetaDataFactory)
|
| where each BeanMetaDataFactory has a beans property of type ManagedObject(@ComponentType={MCBean,*},BeanMetaData)[] for the mcbeans compoment that maps to a ManagedComponent. The id is the name of the bean for the components, for the factories it would have to be the index in the array.
|
| Are you talking about the id changing from Bean1 to Bean1.1?
|
Hmm what i mean is that if you have a collection of ManagedObjects which represent for example your datasources or beans.
And you update one of them it would be good to have a identifier to see which ManagedObject to update.
Because if the order of this collection (for some reason) changes, it will just change the properties of a different bean or datasource.
Making the ManagedObjectID required and immutable, would help to identify that again...
Not sure if there is a different way to do that ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4191488#4191488
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4191488
More information about the jboss-dev-forums
mailing list