On Sep 29, Davide Mora quoth:
> I'm trying to get an answer about what happen if i
> remove rows from the database while the application
> server is running (using a trigger for example, for
> make my application faster).
> I found some answers in other newsgroups, some says
> it's possible, some of them said if i remove the row i
> remove also the bean will be removed (how possible???
> removed from the cache?) ... i did some tests, and
> seems work with some jdbc drivers, while with others i
> got am XA exception.
>
> Somebody knows more about about this?
A read of section 9.1.10 of the ejb Spec covers the differences between
different container commit-time options. A, B and C. In a nutshell (if
my understanding is correct), option A assumes nobody will be modifying
the underlying database except via the container and it's bean instances.
With option B, before beginning the next transaction, the container will
synchronize the bean state with the database (ejbLoad), presumably
allowing cached instances for performance (i.e. optimistic caching of
state allowing for lightweight checks before the next transaction)
And Option C, the container will discard (passivate) instances of a bean
between transactions. I can only imagine you would use C if your bean
transactions are few and far between or have nothing to gain by caching.
I.e. large number of beans in storage but relatively few accessed at any
one time or extremely large number of beans where you know that a typical
LRU caching algorithm won't gain you any performance benfits.
>From your description you want to use either Option B or C to allow your
external apps to modify the database concurrently with your ejb app.
C=)
--------------------------------------------------------------------------
There are no significant bugs in our released software that any significant
number of users want fixed. -Bill Gates, Focus Magazine, Oct 23, 1995
--------------------------------------------------------------------------
Caskey <caskey*technocage.com> /// TechnoCage Inc.
--------------------------------------------------------------------------
"Welcome to the slippery slope, here is your handbasket.
...say, can you work 70 hours this week?"
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]