-
1. Re: ejbLoad "NoSuchEntityException" error
jrramon Feb 14, 2002 1:11 PM (in response to iaguirre)Hi,
May this be a bug?
Jose R. -
2. Re: ejbLoad "NoSuchEntityException" error
wolfc Feb 14, 2002 2:08 PM (in response to iaguirre)You say the loop runs parallel (in two Threads possibly).
Let's say the find method returns a collection with 1 entity "MyEntity".
Thread 1: collection = { "MyEntity" };
Thread 2: collection = { "MyEntity" };
Thread 1: remove "MyEntity";
Thread 2: update/remove/query "MyEntity";
Since the entity is not in memory (it's removed), Jboss
will try to load it with ejbLoad. But allas it's also removed from storage, so NoSuchEntityException. -
3. Re: ejbLoad "NoSuchEntityException" error
jrramon Feb 15, 2002 2:47 AM (in response to iaguirre)
So, is this a normal behaviour?
I thougth this shouldn´t happen in the execution of the same method of the same EJB.
Jose R. -
4. Re: ejbLoad "NoSuchEntityException" error
wolfc Feb 15, 2002 3:03 AM (in response to iaguirre)It is normal behaviour if you have two Threads/clients calling this bean. You can make your session bean a singleton then the problem would be solved. (At the cost of performance.)
Changing the container configuration in your jboss.xml with the following should do the trick:
<instance-pool>org.jboss.ejb.plugins.SingletonStatelessSessionInstancePool</instance-pool>
<container-pool-conf>
true
</container-pool-conf>