commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clebert Suconic <clebert.suco...@gmail.com>
Subject BeanUtilsBean thread safe? Why wouldn't you make Fluent default?
Date Mon, 15 Dec 2014 18:44:00 GMT
Hello There..


I'm going to use BeanUtils on ActiveMQ6 to solve properties on my URL parsing:


I'm setting the BeanUtils instance static on a class.

and I'm going to eventually use it for setting things on my factory:


https://gist.github.com/clebertsuconic/be31b2789e7271db002b



This is a link to my branch:
https://github.com/clebertsuconic/activemq-6/blob/master-uri/activemq-commons/src/main/java/org/apache/activemq/utils/uri/URISchema.java

However that's a transient branch, and that's why I added a gist here.



So, is BeanUtilsBean thread safe? Do I need the synchronized around
the class? I tried to read the code and I believed it wouldn't be safe
to do it in multi-thread. (That's probably why you guys use a
ThreadLocal).  The usage here will be very minimal (at my startup time
only), so I didn't really mind having the synchronized...   but I
wanted to double check for correctness..



also: Why won't you make the FluentIntrospector default on the default
BeanUtils? it's not 2005 any more :)



Anyways: I have worked with you guys before here... long time ago:
https://issues.apache.org/jira/browse/BEANUTILS-291


It was fun seeing something I did (my collaboration with Niall) almost
10 years ago still in place at the current master :)

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message