Greetings,

Unfortunately the only way to resolve your concurrency problem is to use an
Entity bean containing you list. That way your Session bean acquires in its
create and activate methods a reference to the list entity bean and releases
it in the passivate and remove methods.  Your Entity bean must have
Transaction required as its property, which can be either container or bean
managed. The entity bean is the 'critical section' and the transaction is
the 'monitor'. When Orion supports (hopefully in the near future)
EjbLocalBeans we won't be burdened with the network hit. See EJB 2.0
specifications. 

Dave

-----Original Message-----
From: Lachezar Dobrev [mailto:[EMAIL PROTECTED]]
Sent: Monday, August 06, 2001 11:26 AM
To: Orion-Interest
Subject: Re: Concurrency


   Hi.

   Reposting this message. the next has already been received.
   This list lacks stability a lot.

   Not sure, if this has something to do with your problem.
   1: java.util.List is an Interface. You can't have the Interface live,
except in a class/object, implementing this interface. For an instance the
class java.util.AbstractList is the first one, that implements this
interface. so having a parameter/return value of type java.util.List means
actualy an instance of a class implementing java.util.List.
   2. Orion subclasses AbstractList in many places to implement it's lists.
Quite handy. One place is the list OR-mapping,
com.evermind.server.ejb.ORList. Are you sure, you don't use container
managed Lists?

   BTW. I'm not exactly sure how do you access Concurently a StateLess
Session Bean? I tried and got no result... Hmmm...


   Be well: Lachezar

> Hi ted,
> You are right, but the exeption is in an AbstractList and I'm not using
any
> extension of AbstractList. In addition, the exeption is in com.evermind
> pakage.
> I have analyzed this package and I've seen that the method
> com.evermind.server.rmi.RMIServer.gb uses a java.util.List. Therefore I
> suppose that it is an orion problem when the SLSB is created.
> Thanks, Esteban
>
>
>
> -----Original Message-----
> From: Rice, Ted [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 27, 2001 1:45 PM
> To: Orion-Interest
> Subject: RE: Concurrency
>
>
> you are working with a non-synchronized
> collection. if you get an iterator and
> attempt to modify the backing list with
> multiple threads you will receive a
> ConcurrentModificationException. synchronize
> on the the iterator or list.
>
> ./ted
>
> -----Original Message-----
> From: Lopez Esteban [mailto:[EMAIL PROTECTED]]
> Sent: Friday, July 27, 2001 3:44 AM
> To: Orion-Interest
> Subject: Concurrency
>
>
> > Hi
> > Please help me. I am working with a stateless EJB and I have about 250
> > clients which has to use this EJB.
> > When the clients access to the SLEJB concurretly, the Orion crash, and
the
> > server.log shows:
> >
> > 7/4/01 6:45 PM Internal server error
> > java.util.ConcurrentModificationException
> > at java.util.AbstractList$Itr.checkForComodification(Unknown Source)
> > at java.util.AbstractList$Itr.next(Unknown Source)
> > at java.util.AbstractCollection.remove(Unknown Source)
> > at com.evermind.server.rmi.RMIServer.gb(JAX)
> > at com.evermind.server.rmi.ba.run(JAX)
> > at com.evermind.util.f.run(JAX)
> >
> > Anyone knows something about this.
> > Thanks!
> >
> > Esteban.
> >
>
>
>
>



Reply via email to