Community

beanifying the config

reply from Mark Little in JBoss Transactions Development - View the full discussion

I was looking at this recently because of some of the unit tests I was writing (wanted to change the setting in one test and then revert in another, but there was no way to revert once it was set). My solution (not implemented) was going to be similar to what you've outlined: hide the synchronization in the bean through a factory. Those classes that really don't ever want to be informed of changes can then implement whatever policy they want at a higher level, e.g., assigning a local variable and not going back to the bean beyond the first call.

Reply to this message by going to Community

Start a new discussion in JBoss Transactions Development at Community