[jira] [Commented] (SANDBOX-472) Transformer Registry

2014-08-25 Thread Benedikt Ritter (JIRA)

[ 
https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14108904#comment-14108904
 ] 

Benedikt Ritter commented on SANDBOX-472:
-

Hello Yogesh,

a patch with just the registry would be great! We can then think about how we 
want to include the registry into the existing code.

TIA!
Benedikt

> Transformer Registry
> 
>
> Key: SANDBOX-472
> URL: https://issues.apache.org/jira/browse/SANDBOX-472
> Project: Commons Sandbox
>  Issue Type: Task
>  Components: BeanUtils2
>Affects Versions: Nightly Builds
>Reporter: Yogesh Rao
>Assignee: Benedikt Ritter
> Fix For: Nightly Builds
>
> Attachments: TestStringFloatTransformerImpl.java.txt, 
> TestStringIntegerTransformerImpl.java.txt, TransformerRegistry.java.txt, 
> TransformerRegistryTestCase.java.txt, sandbox-472.patch
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing 
> out on basics. Beanutils1 has a functionality wherein all the converters are 
> registered and are called when conversion in value is required. This 
> functionality is missing for BU2 project. I also saw that BeanUtils1 uses 
> WeakFastHashMap for this, which seems like is having issues across 
> architectures and did see few JIRA's on this. Wanted inputs if having a 
> synchronized instance of WeakHashMap wrapped in the TransformerRegsitry class 
> and providing methods to register, deregister, restoreDefault, lookup be 
> desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SANDBOX-472) Transformer Registry

2014-08-25 Thread Yogesh Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14108837#comment-14108837
 ] 

Yogesh Rao commented on SANDBOX-472:


Hi Benedikt,

Thank you for reviewing the patch ! 

Apologies, I should have cleared the thought in ML before i submitted the 
patch. The idea was to create a container which held all the transformers i.e. 
TransformerRegistry in code. Holding the transformers would be the only 
responsibility of the class for now. To use the Registry and perform all 
operations around it the TransformerUtilsBean was created.So this has methods 
for converting and populating the registry with help of an external loader. The 
reason the loading of transformers was externalized because it gave the 
extensibility to the design of allowing the user to push in custom transformers 
if needed.

Keeping in mind our previous discussion on creating a context built around the 
builder pattern, if the user needed customized transformers the loader is 
something that would be passed (using fluent api) instead of a Single 
Transformer or a Collection of it. (This loader would be extension of our 
loader or  a scratch implementation) This loader would be later on passed while 
creating the TransformerUtilsBean during the context creation thus helping us 
load the registry and make it available. My thought was to hide all of this 
inside the framework which ends up calling the TransformerUtilsBean only when 
it needs to convert.

WDYT ?

I can provide a patch with just the Registry and the test cases surrounding it.

Regards,
-Yogesh

> Transformer Registry
> 
>
> Key: SANDBOX-472
> URL: https://issues.apache.org/jira/browse/SANDBOX-472
> Project: Commons Sandbox
>  Issue Type: Task
>  Components: BeanUtils2
>Affects Versions: Nightly Builds
>Reporter: Yogesh Rao
>Assignee: Benedikt Ritter
> Fix For: Nightly Builds
>
> Attachments: TestStringFloatTransformerImpl.java.txt, 
> TestStringIntegerTransformerImpl.java.txt, TransformerRegistry.java.txt, 
> TransformerRegistryTestCase.java.txt, sandbox-472.patch
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing 
> out on basics. Beanutils1 has a functionality wherein all the converters are 
> registered and are called when conversion in value is required. This 
> functionality is missing for BU2 project. I also saw that BeanUtils1 uses 
> WeakFastHashMap for this, which seems like is having issues across 
> architectures and did see few JIRA's on this. Wanted inputs if having a 
> synchronized instance of WeakHashMap wrapped in the TransformerRegsitry class 
> and providing methods to register, deregister, restoreDefault, lookup be 
> desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SANDBOX-472) Transformer Registry

2014-08-24 Thread Benedikt Ritter (JIRA)

[ 
https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14108792#comment-14108792
 ] 

Benedikt Ritter commented on SANDBOX-472:
-

Hello [~yogu13],

I've looked into your lastest patch. The TransformerRegistry looks good! But 
where has the TransformerRegistryTestCase gone? :) It is missing in your patch. 
Further more I currently don't understand what you're trying to achieve with 
the TransformerRegistryLoader and the TransformerUtilsBean. 

I don't think that we need the loader. Having an object that handles 
transforming is maybe a good thing. Although I'd just call it a 
TransformerBean. Can't we just pass the TransformerRegistry to the 
TransformerBean? We can provide different implementations of the 
TransformerRegistry (by extracting an interface), for example one that provide 
a fluent API for adding additional transformers.

Since I'd like to finally commit party of your hard work, may I ask you to 
create a patch just containing the TransformerRegistry and the 
TransformerRegistryTestCase (and test transformers if needed)? We can add that 
to the code base and then start working on the integration of the registry from 
there on. WDYT?

Best regards and many thanks for your patience!
Benedikt

> Transformer Registry
> 
>
> Key: SANDBOX-472
> URL: https://issues.apache.org/jira/browse/SANDBOX-472
> Project: Commons Sandbox
>  Issue Type: Task
>  Components: BeanUtils2
>Affects Versions: Nightly Builds
>Reporter: Yogesh Rao
>Assignee: Benedikt Ritter
> Fix For: Nightly Builds
>
> Attachments: TestStringFloatTransformerImpl.java.txt, 
> TestStringIntegerTransformerImpl.java.txt, TransformerRegistry.java.txt, 
> TransformerRegistryTestCase.java.txt, sandbox-472.patch
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing 
> out on basics. Beanutils1 has a functionality wherein all the converters are 
> registered and are called when conversion in value is required. This 
> functionality is missing for BU2 project. I also saw that BeanUtils1 uses 
> WeakFastHashMap for this, which seems like is having issues across 
> architectures and did see few JIRA's on this. Wanted inputs if having a 
> synchronized instance of WeakHashMap wrapped in the TransformerRegsitry class 
> and providing methods to register, deregister, restoreDefault, lookup be 
> desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SANDBOX-472) Transformer Registry

2014-08-21 Thread Benedikt Ritter (JIRA)

[ 
https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14106506#comment-14106506
 ] 

Benedikt Ritter commented on SANDBOX-472:
-

[~yogu13], thank you for your patience! I'm currently pretty busy, but I'll 
review your patch this weekend. Stay tuned ;)

> Transformer Registry
> 
>
> Key: SANDBOX-472
> URL: https://issues.apache.org/jira/browse/SANDBOX-472
> Project: Commons Sandbox
>  Issue Type: Task
>  Components: BeanUtils2
>Affects Versions: Nightly Builds
>Reporter: Yogesh Rao
> Fix For: Nightly Builds
>
> Attachments: TestStringFloatTransformerImpl.java.txt, 
> TestStringIntegerTransformerImpl.java.txt, TransformerRegistry.java.txt, 
> TransformerRegistryTestCase.java.txt, sandbox-472.patch
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing 
> out on basics. Beanutils1 has a functionality wherein all the converters are 
> registered and are called when conversion in value is required. This 
> functionality is missing for BU2 project. I also saw that BeanUtils1 uses 
> WeakFastHashMap for this, which seems like is having issues across 
> architectures and did see few JIRA's on this. Wanted inputs if having a 
> synchronized instance of WeakHashMap wrapped in the TransformerRegsitry class 
> and providing methods to register, deregister, restoreDefault, lookup be 
> desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SANDBOX-472) Transformer Registry

2014-08-04 Thread Yogesh Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14084856#comment-14084856
 ] 

Yogesh Rao commented on SANDBOX-472:


will raise a different issue for 
1. loader - impl for adding transformers to registry
2. different transformer implementations.

Regards,
-Yogesh


> Transformer Registry
> 
>
> Key: SANDBOX-472
> URL: https://issues.apache.org/jira/browse/SANDBOX-472
> Project: Commons Sandbox
>  Issue Type: Task
>  Components: BeanUtils2
>Affects Versions: Nightly Builds
>Reporter: Yogesh Rao
> Fix For: Nightly Builds
>
> Attachments: TestStringFloatTransformerImpl.java.txt, 
> TestStringIntegerTransformerImpl.java.txt, TransformerRegistry.java.txt, 
> TransformerRegistryTestCase.java.txt, sandbox-472.patch
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing 
> out on basics. Beanutils1 has a functionality wherein all the converters are 
> registered and are called when conversion in value is required. This 
> functionality is missing for BU2 project. I also saw that BeanUtils1 uses 
> WeakFastHashMap for this, which seems like is having issues across 
> architectures and did see few JIRA's on this. Wanted inputs if having a 
> synchronized instance of WeakHashMap wrapped in the TransformerRegsitry class 
> and providing methods to register, deregister, restoreDefault, lookup be 
> desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SANDBOX-472) Transformer Registry

2014-07-30 Thread Yogesh Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14079312#comment-14079312
 ] 

Yogesh Rao commented on SANDBOX-472:


Got it! Thank you for the feedback :-) .. i am working on this

Regards,
-Yogesh

> Transformer Registry
> 
>
> Key: SANDBOX-472
> URL: https://issues.apache.org/jira/browse/SANDBOX-472
> Project: Commons Sandbox
>  Issue Type: Task
>  Components: BeanUtils2
>Affects Versions: Nightly Builds
>Reporter: Yogesh Rao
> Fix For: Nightly Builds
>
> Attachments: TestStringFloatTransformerImpl.java.txt, 
> TestStringIntegerTransformerImpl.java.txt, TransformerRegistry.java.txt, 
> TransformerRegistryTestCase.java.txt
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing 
> out on basics. Beanutils1 has a functionality wherein all the converters are 
> registered and are called when conversion in value is required. This 
> functionality is missing for BU2 project. I also saw that BeanUtils1 uses 
> WeakFastHashMap for this, which seems like is having issues across 
> architectures and did see few JIRA's on this. Wanted inputs if having a 
> synchronized instance of WeakHashMap wrapped in the TransformerRegsitry class 
> and providing methods to register, deregister, restoreDefault, lookup be 
> desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SANDBOX-472) Transformer Registry

2014-07-26 Thread Benedikt Ritter (JIRA)

[ 
https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14075327#comment-14075327
 ] 

Benedikt Ritter commented on SANDBOX-472:
-

Hello Yogesh,

I've applied your changes from SANDBOX-473 and now I've reviewed your patch. 
Here are my findings:

* Can you please create only one patch that contains all changes? If you're 
using eclipse you just have to select the project root and create the patch 
from there. If you're using the command line, just type {{svn diff > 
sandbox-472.patch}}
* Please make sure you produce valid JavaDoc. Since Java 8, the JavaDoc tool is 
very strict. For example the class JavaDoc would be invalid since you're not 
closing the second {{}} tag.
* Don't add empty JavaDoc (as for the CLASS_TYTPE_NAME_PREFIX and the 
transformers map). It just clutters the code. (The same is true for out 
generated Eclipse JavaDocs in the TestStringIntegerTransformerImpl)
* You should better validate that sourceType and destinationType are not null 
in the TransformerMapKey's constructor. This way you don't have to do the 
validation in every method later on.
* Don't use different terms for the same thing. Your implementing a 
TransformerRegistry but the JavaDoc for {{register(Transformer)}} talks 
about "the container". Better use the term registry here.
* Don't add a dash after the parameter name in {{@param}} JavaDoc tags
* Sentences should start with an upper case letter (the JavaDoc of the 
{{deregister}} methods doesn't)
* The getClass method doesn't look useful to me. You're using it in 
{{deregister(Transformer)}} to get the Class object of a type (which is 
unsafe btw, since an instance of Type is not necessary an instance of Class), 
then you're passing the types into a TransformerMapKey which itself works with 
Types. So there is no need to get the classes. 
* Why is only the targetType checked for null in {{lookup(Class, Class)}}?
* Lookup should return null if the transformer can not be found.
* Please remove the "Impl" postfix from the test transformers. Using the "Impl" 
postfix is an anti pattern, IMHO...

Regards,
Benedikt

> Transformer Registry
> 
>
> Key: SANDBOX-472
> URL: https://issues.apache.org/jira/browse/SANDBOX-472
> Project: Commons Sandbox
>  Issue Type: Task
>  Components: BeanUtils2
>Affects Versions: Nightly Builds
>Reporter: Yogesh Rao
> Fix For: Nightly Builds
>
> Attachments: TestStringFloatTransformerImpl.java.txt, 
> TestStringIntegerTransformerImpl.java.txt, TransformerRegistry.java.txt, 
> TransformerRegistryTestCase.java.txt
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing 
> out on basics. Beanutils1 has a functionality wherein all the converters are 
> registered and are called when conversion in value is required. This 
> functionality is missing for BU2 project. I also saw that BeanUtils1 uses 
> WeakFastHashMap for this, which seems like is having issues across 
> architectures and did see few JIRA's on this. Wanted inputs if having a 
> synchronized instance of WeakHashMap wrapped in the TransformerRegsitry class 
> and providing methods to register, deregister, restoreDefault, lookup be 
> desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SANDBOX-472) Transformer Registry

2014-07-22 Thread Yogesh Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14071352#comment-14071352
 ] 

Yogesh Rao commented on SANDBOX-472:


before applying this patch it is necessary to apply the patches for issue/ task 
: sandbox 472 as the API uses the exception which would be thrown by the 
convert method in Transformer. Assuming for now that the exception is needed in 
the API. 

I am now working on class which loads all the transformers into the registry 
and does the conversion as well.

Regards,
-Yogesh

> Transformer Registry
> 
>
> Key: SANDBOX-472
> URL: https://issues.apache.org/jira/browse/SANDBOX-472
> Project: Commons Sandbox
>  Issue Type: Task
>  Components: BeanUtils2
>Affects Versions: Nightly Builds
>Reporter: Yogesh Rao
> Fix For: Nightly Builds
>
> Attachments: TestStringFloatTransformerImpl.java.txt, 
> TestStringIntegerTransformerImpl.java.txt, TransformerRegistry.java.txt, 
> TransformerRegistryTestCase.java.txt
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing 
> out on basics. Beanutils1 has a functionality wherein all the converters are 
> registered and are called when conversion in value is required. This 
> functionality is missing for BU2 project. I also saw that BeanUtils1 uses 
> WeakFastHashMap for this, which seems like is having issues across 
> architectures and did see few JIRA's on this. Wanted inputs if having a 
> synchronized instance of WeakHashMap wrapped in the TransformerRegsitry class 
> and providing methods to register, deregister, restoreDefault, lookup be 
> desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SANDBOX-472) Transformer Registry

2014-07-22 Thread Yogesh Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14069929#comment-14069929
 ] 

Yogesh Rao commented on SANDBOX-472:


Hi Benedikt,

Attaching the Transformer Registry and the test cases associated with it. Have 
few open questions to be addressed in the code for thread safety and exception 
handling if required as this would be my first development patch for commons :-)

Let me know if you find any issues.

Regards,
-Yogesh

> Transformer Registry
> 
>
> Key: SANDBOX-472
> URL: https://issues.apache.org/jira/browse/SANDBOX-472
> Project: Commons Sandbox
>  Issue Type: Task
>  Components: BeanUtils2
>Affects Versions: Nightly Builds
>Reporter: Yogesh Rao
> Fix For: Nightly Builds
>
> Attachments: TestStringFloatTransformerImpl.java.txt, 
> TestStringIntegerTransformerImpl.java.txt, TransformerRegistry.java.txt, 
> TransformerRegistryTestCase.java.txt
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing 
> out on basics. Beanutils1 has a functionality wherein all the converters are 
> registered and are called when conversion in value is required. This 
> functionality is missing for BU2 project. I also saw that BeanUtils1 uses 
> WeakFastHashMap for this, which seems like is having issues across 
> architectures and did see few JIRA's on this. Wanted inputs if having a 
> synchronized instance of WeakHashMap wrapped in the TransformerRegsitry class 
> and providing methods to register, deregister, restoreDefault, lookup be 
> desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SANDBOX-472) Transformer Registry

2014-07-17 Thread Yogesh Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14064764#comment-14064764
 ] 

Yogesh Rao commented on SANDBOX-472:


makes sense... i am starting work on building the registry to hold all the 
transformers.

Regards,
-Yogesh

> Transformer Registry
> 
>
> Key: SANDBOX-472
> URL: https://issues.apache.org/jira/browse/SANDBOX-472
> Project: Commons Sandbox
>  Issue Type: Task
>  Components: BeanUtils2
>Affects Versions: Nightly Builds
>Reporter: Yogesh Rao
> Fix For: Nightly Builds
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing 
> out on basics. Beanutils1 has a functionality wherein all the converters are 
> registered and are called when conversion in value is required. This 
> functionality is missing for BU2 project. I also saw that BeanUtils1 uses 
> WeakFastHashMap for this, which seems like is having issues across 
> architectures and did see few JIRA's on this. Wanted inputs if having a 
> synchronized instance of WeakHashMap wrapped in the TransformerRegsitry class 
> and providing methods to register, deregister, restoreDefault, lookup be 
> desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SANDBOX-472) Transformer Registry

2014-06-29 Thread Benedikt Ritter (JIRA)

[ 
https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14047225#comment-14047225
 ] 

Benedikt Ritter commented on SANDBOX-472:
-

Hello [~yogu13],

sorry for the late reply, I had little time for OSS lately. Regarding your 
proposal: 

I think we're building up a shared understanding on how the API looks like. 
However don't think we should create BeanUtils instances specifically for one 
class, since traversing the object graph using getters will return objects of 
different types.

How about we add a basic transformer functionality first and when that is in 
place, we think about how we can make it customizable?

Best regards,
Benedikt

> Transformer Registry
> 
>
> Key: SANDBOX-472
> URL: https://issues.apache.org/jira/browse/SANDBOX-472
> Project: Commons Sandbox
>  Issue Type: Task
>  Components: BeanUtils2
>Affects Versions: Nightly Builds
>Reporter: Yogesh Rao
> Fix For: Nightly Builds
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing 
> out on basics. Beanutils1 has a functionality wherein all the converters are 
> registered and are called when conversion in value is required. This 
> functionality is missing for BU2 project. I also saw that BeanUtils1 uses 
> WeakFastHashMap for this, which seems like is having issues across 
> architectures and did see few JIRA's on this. Wanted inputs if having a 
> synchronized instance of WeakHashMap wrapped in the TransformerRegsitry class 
> and providing methods to register, deregister, restoreDefault, lookup be 
> desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SANDBOX-472) Transformer Registry

2014-05-19 Thread Yogesh Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14002842#comment-14002842
 ] 

Yogesh Rao commented on SANDBOX-472:


hi,

quick thoughts on the builder pattern implementation.
Was wondering if including the class type / object / name  as part of the build 
up of the BU2object would add value. The advantage that i see is that
the class definitions on which reflection needs to be applied etc can be stored 
with the instance and be reused over subsequent invocations on the different 
methods of the class

for eg:-

BeanUtils classXYZUtil = new 
BeanUtils.Configure().forClassName("x.y.z").addTransformer("a.b.c",transformerImpl).build()
classXYZUtil.set("name").with(true);
classXYZUtil.set("age").with(21);


Here Configure is a inner class and has methods to set the bean type / object 
or name and also methods for adding or replacing the default transformers / 
converters shipped with BU2

I would recommend instead of the factory approach can we provide helper class 
with methods which would be used by developers who wouldnt like to create their 
own cutomized BU2 instances
and also do not want to make multiple calls to the object for setting / getting 
values (quite similar to the what is existing in BU2 today)

> Transformer Registry
> 
>
> Key: SANDBOX-472
> URL: https://issues.apache.org/jira/browse/SANDBOX-472
> Project: Commons Sandbox
>  Issue Type: Task
>  Components: BeanUtils2
>Affects Versions: Nightly Builds
>Reporter: Yogesh Rao
> Fix For: Nightly Builds
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing 
> out on basics. Beanutils1 has a functionality wherein all the converters are 
> registered and are called when conversion in value is required. This 
> functionality is missing for BU2 project. I also saw that BeanUtils1 uses 
> WeakFastHashMap for this, which seems like is having issues across 
> architectures and did see few JIRA's on this. Wanted inputs if having a 
> synchronized instance of WeakHashMap wrapped in the TransformerRegsitry class 
> and providing methods to register, deregister, restoreDefault, lookup be 
> desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SANDBOX-472) Transformer Registry

2014-05-13 Thread Yogesh Rao (JIRA)

[ 
https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13996242#comment-13996242
 ] 

Yogesh Rao commented on SANDBOX-472:


Hello Benedikt,

from what i see in beanutils1 only converters are the ones which the user would 
like to customize, i am not sure if there is anything else other than that, 
please let me know if we had come across any other scenario during BU1 for such 
kind of customization...

-Yogesh



> Transformer Registry
> 
>
> Key: SANDBOX-472
> URL: https://issues.apache.org/jira/browse/SANDBOX-472
> Project: Commons Sandbox
>  Issue Type: Task
>  Components: BeanUtils2
>Affects Versions: Nightly Builds
>Reporter: Yogesh Rao
> Fix For: Nightly Builds
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing 
> out on basics. Beanutils1 has a functionality wherein all the converters are 
> registered and are called when conversion in value is required. This 
> functionality is missing for BU2 project. I also saw that BeanUtils1 uses 
> WeakFastHashMap for this, which seems like is having issues across 
> architectures and did see few JIRA's on this. Wanted inputs if having a 
> synchronized instance of WeakHashMap wrapped in the TransformerRegsitry class 
> and providing methods to register, deregister, restoreDefault, lookup be 
> desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)


[jira] [Commented] (SANDBOX-472) Transformer Registry

2014-05-02 Thread Benedikt Ritter (JIRA)

[ 
https://issues.apache.org/jira/browse/SANDBOX-472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13987565#comment-13987565
 ] 

Benedikt Ritter commented on SANDBOX-472:
-

Hello Yogesh,

we will need this functionality in order to make BU2 a substitute for BeanUtils 
1. Currently I'm only having a vague plan on how to implement this. One thing I 
know for sure is, that I don't want to have static methods that configure how 
BeanUtils work. In BeanUtils1 you can register new Converters using static 
methods. At the moment I'm thinking about something like this:

The BeanUtils class will serve like some kind of factory for BeanUtils 
instances. It provides a preconfigured BeanUtils instance which has the 
standard Converts registered. If users need a custom instance they can use a 
builder kind of API to create a new instance, which they can pass around and do 
stuff with. The standard instance that is registered on the factory can not be 
changed to preserve behavior.

So implementing the registry is the second step. First we need to decide how 
the API for customizing BeanUtils instances will look like.

> Transformer Registry
> 
>
> Key: SANDBOX-472
> URL: https://issues.apache.org/jira/browse/SANDBOX-472
> Project: Commons Sandbox
>  Issue Type: Task
>  Components: BeanUtils2
>Affects Versions: Nightly Builds
>Reporter: Yogesh Rao
> Fix For: Nightly Builds
>
>
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing 
> out on basics. Beanutils1 has a functionality wherein all the converters are 
> registered and are called when conversion in value is required. This 
> functionality is missing for BU2 project. I also saw that BeanUtils1 uses 
> WeakFastHashMap for this, which seems like is having issues across 
> architectures and did see few JIRA's on this. Wanted inputs if having a 
> synchronized instance of WeakHashMap wrapped in the TransformerRegsitry class 
> and providing methods to register, deregister, restoreDefault, lookup be 
> desired?



--
This message was sent by Atlassian JIRA
(v6.2#6252)