This one time, at band camp, Andy Stanberry said:
AS>We run castor from an MVC servlet environment. An action is called on a
AS>controller that access castor and returns data to be displayed in a jsp.
AS>Our controller is multi threaded and can have many concurrent users. I've
AS>found that if i have one instance of a Database, that I get exceptions when
AS>2 ppl try to access the controller at the same time. If I switch to an
AS>instance of the Database for each action, this goes away.
AS>
AS>ok, the question:
AS>
AS>Is Castors optimization/caching, whatever makes running the same oql a
AS>second time faster, dependant on an instance of a Database? If so is there
AS>anyway to have it function optimized in the environment that we are
AS>running? I don't know if this involves threads, I just need it to be
AS>optimized. If this is not the case, is Castor the proper tool to be using
AS>in a servlet environment to gain optimization?
AS>
AS>There are no long transactions, as the objects are converted into text for
AS>each view, where the user interacts and then sends a call to another action
AS>that takes the request object (Strings) and perfroms the necessary
AS>operations with Castor. I can give more details on the environment if needed.
Andy,
Castor's OQL implementation does no caching of statements. This is
unfortunate because it would be very nice to have this feature.
However, like most of the other things that Castor is lacking, it's
a matter of active contributors and time. Mickael and I can't handle
everything on our own.
Have you tried using the Database.load() methods with a Complex
object instead of using OQL? I'm not even sure that you can do this
within your app, but it's definitely an alternative. OQL goes
straight to the database, whereas load() checks the cache first.
Bruce
--
perl -e 'print unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev