On Mar 9, 2009, at 2:35 AM, <[email protected]> <[email protected] > wrote:

Hi,

does anyone use the alternate deployment descriptor?
As soon as I activate the alternate DD I run into a java.util.ConcurrentModificationException, because the HashMap is changed after the iterator is created.
So I wonder if anyone could use it yet?


2009-03-09 10:29:51,268 ERROR OpenEJB:46 - FATAL ERROR: Unknown error in Assembler. Please send the following stack trace and this message to use
enejb.org :
java.util.ConcurrentModificationException
       at java.util.HashMap$HashIterator.nextEntry(HashMap.java:841)
       at java.util.HashMap$EntryIterator.next(HashMap.java:883)
       at java.util.HashMap$EntryIterator.next(HashMap.java:881)
at org .apache .openejb.config.DeploymentLoader.altDDSources(DeploymentLoader.java: 958)

Strange... not the exception but that I didn't get it in my test case. Looks like if your map size is one and you iterate and update that one entry, you won't get a concurrent modification exception.

Anyway, I've fixed up the code and test case. I also added a bit more functionality to it so that you can have a list of prefixes expressing an order of preference "first, second, third", etc. Thought it might be useful if there were a few alternate descriptors that you might want to share between a few or all tests, but then still be able to have slightly more specific alternate descriptors for a specific test without having to duplicate the full set of alternate descriptors. Updating the site with details on that.


-David

Reply via email to