commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Java Developer (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (BEANUTILS-304) BeanDiff - encapsulate, apply, and merge bean differences
Date Tue, 08 Sep 2009 05:02:57 GMT

    [ https://issues.apache.org/jira/browse/BEANUTILS-304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752014#action_12752014
] 

Java Developer edited comment on BEANUTILS-304 at 9/7/09 10:02 PM:
-------------------------------------------------------------------

Sorry for English!:

In Weblogic application server's classes and jar files you can find the "com.bea.core.descriptor_1.4.0.0.jar"
in "BEA_HOME\modules" folder.

You can find some interesting classes inside "weblogic.descriptor" package (e.g. BeanUpdateListener,
BeanUpdateEvent, DescriptorBean, Descriptor) . And also another interesting class "weblogic.descriptor.internal.BeanDiff"
class. Looking at them is useful!! and may brings some ideas.

Implementing this feature would also eases the process of writing ConfigurationMBeans for
applications(http://issues.apache.org/jira/browse/CONFIGURATION-394). ConfigurationMBeans
and RuntimeMBeans are two mbean hierarchy in weblogic application server.




      was (Author: myapacheaccount):
    Sorry for English!:

In Weblogic application server's classes and jar files you can find the "com.bea.core.descriptor_1.4.0.0.jar"
in "BEA_HOME\modules" folder.

You can find some interesting classes inside "weblogic.descriptor" package (e.g. BeanUpdateListener,
BeanUpdateEvent, DescriptorBean, Descriptor) . And also another interesting class "weblogic.descriptor.internal.BeanDiff"
class. Looking at the source of them(using decompilers!) is useful!! and may brings some ideas.

Implementing this feature would also eases the process of writing ConfigurationMBeans for
applications(http://issues.apache.org/jira/browse/CONFIGURATION-394).

  
> BeanDiff - encapsulate, apply, and merge bean differences
> ---------------------------------------------------------
>
>                 Key: BEANUTILS-304
>                 URL: https://issues.apache.org/jira/browse/BEANUTILS-304
>             Project: Commons BeanUtils
>          Issue Type: New Feature
>          Components: Bean / Property Utils, Bean-Collections, ConvertUtils & Converters,
DynaBean
>    Affects Versions: LATER THAN 1.8.1
>            Reporter: Mark Lewis
>             Fix For: LATER THAN 1.8.1
>
>   Original Estimate: 240h
>  Remaining Estimate: 240h
>
> It would be great to have a way to compare two beans and capture the diff somehow.  This
is just my initial brainstorm on the idea:
> - The BeanDiff class encapsulates differences between two beans -of the same type-, the
source bean and the target bean.
> - A BeanDiff instance represents what property assignments would be necessary to turn
the target bean into the source bean.
> - A BeanDiff can be applied to a target bean, performing the necessary property assignments
to make its property values exactly match the source bean.
> - Two BeanDiff instances can be merged into a single BeanDiff instance, allowing multiple
source beans to be merged into one target bean.
> - If a conflict would occur during a merge (from a property being assigned two different
values), a BeanDiffConflictException is thrown.
> - The BeanDiffConflictException contains an array of BeanDiffConflict objects.
> - Each BeanDiffConflict instance represents a single property and the two conflicting
values that were to be assigned.
> - All these actions would work on DynaBeans as well.
> - +Converters would be able to account for type differences in source and target bean
properties.+
> An example of how this could be used is when dealing with ORM and optimistic locking.
 Knowing exactly which properties have been modified would allow concurrent modification of
a bean (record) without fear of reasserting the original values and destroying someone else's
changes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message