[jboss-user] [JBoss Seam] - ConcurrentModificationException
bluetrade
do-not-reply at jboss.com
Mon Jul 24 09:10:41 EDT 2006
Hi,
I am getting a ConcurrentModificationException which I cannot really resolve, maybe someone has some hints...
I have the following:
| @Stateful
| @Name("accBroker")
| @Scope(CONVERSATION)
| @LoggedIn
| public class AccountBrokerBean implements AccountBroker{
|
| @In(create=true)
| private EntityManager em;
|
| @In(value="securityBroker",create=true)
| private SecurityBroker securityBroker;
|
| @In
| User user;
|
| @Begin(join=true)
| public void find() {
| List<Accounts> accounts = em.createQuery("from Account");
| securityBroker.filter(user,accounts);
|
| }
| ...
| @Stateful
| @Name("securityBroker")
| @Scope(CONVERSATION)
| @LoggedIn
| public class SecurityBrokerBean implements SecurityBroker{
|
| @In(create=true)
| private EntityManager em;
|
| public void filter(User u, Collection<Accounts> accounts) {
| for (Account a : accounts) {
| if (accounts.notAccessibleBy(user) {
| accounts.remove(a);
| } else if (accounts.accessibleBy(user) {
| continue;
| } else {
| accounts.remove(a);
| }
| }
|
| }
|
| ...
|
I get the CME somehere in the filter method...
Any clues?
Thanks,
Joey
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3960354#3960354
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3960354
More information about the jboss-user
mailing list