Can someone say whether it is advisable or not to use the new event system
under 1.5 to add metadata or bitstreams to an item.

I am moving some of my code to event consumers that would add metadata for
various item types as well as add bitstreams based on bitstreams already
ingested. However I'm getting an exception when I try to commit these
additions within the consumer (either the consume, end or finish methods).
The particular exception is:

java.util.ConcurrentModificationException
       at
java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372)
       at java.util.AbstractList$Itr.next(AbstractList.java:343)
       at
org.dspace.event.BasicDispatcher.dispatch(BasicDispatcher.java:122)
       at org.dspace.core.Context.commit(Context.java:286)
       at
org.ejamaica.server.dspace.DSpaceInstance.addSaying(DSpaceInstance.java:1906)
       at
org.ejamaica.server.dspace.DSpaceInstance.updateSaying(DSpaceInstance.java:1060)
       at
org.ejamaica.server.MyLibraryServiceImpl.myMethod(MyLibraryServiceImpl.java:147)

Just for info. the section in my code that triggers the initial
context.commit() occurs in DSpaceInstance.java:1906.

If I don't commit after I add some metadata and/or bitstreams then I don't
get the error, but then the data and bitstreams don't appear. If I even try
and use the context.getDBConnection().commit(); I get the same exception.

John
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to