We have a problem when there are no free contexts in the pool while we
are in a transaction. The description of the problem is as follows:

We have a stateless session bean that parses XML files. While parsing
instances of an entity bean are created. Just to put in case, each XML
file in our example implies the creation of about 4000 entities and a
lot of XML files are parsed sequentially.

The parse() method happens in a transaction ("Required" in ejb-jar.xml).
Among other things, while parsing, the home is often reclaimed to be
asked for something, so an entity (context) is retrieved for this
matter.
If "maxContexts" property in the entity bean is not big enough, soon all
contexts in the context pool are busy. If this happens, the application
server tries to passivate an entity bean "at random" when reclaiming the
home, if this entity bean is among those ones playing the transaction,
then the exception below is thrown.

Of course, a solution is to increase "maxContexts" but we wonder if that
is a well known behavior or wouldn't be better to avoid trying to
passivate entities that take part in the current transaction.


Thanks,
    C�sar �lvarez.

P.D. An stack trace log file is attached.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to