-dain
On Tuesday, December 10, 2002, at 07:55 AM, Sacha Labourey wrote:
That is really really strange and should be changed IMO. Dain, is that a
side effect of another behaviour or is that really the wanted behaviour. I
suspect that this behaviour is inherited from the "single-pk finders"
behaviour that must go to the db anyway.
Is that also the case when you simply have a proxy to a given entity? Will
this generate a DB access or will it use the one from cache directly?
Cheers,
sacha
-----Message d'origine-----
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]De la part de
Meyer-Willner, Bernhard
Envoy� : mardi, 10 d�cembre 2002 14:47
� : '[EMAIL PROTECTED]'
Objet : AW: [JBoss-user] Another Commit Option A Cache Question :)
JBoss 3.x is doing the same, that is doing a SELECT COUNT before
the actual
SELECT for findByPrimaryKey.
My question also is: is this intended behavior?
-----Urspr�ngliche Nachricht-----
Von: Lennart Petersson [mailto:[EMAIL PROTECTED]]
Gesendet: Dienstag, 10. Dezember 2002 14:11
An: [EMAIL PROTECTED]
Betreff: [JBoss-user] Another Commit Option A Cache Question :)
JBoss 2.4.x
Why does findByPrimaryKey() always result in a 'select
count()....'-query on the database? Is it really needed due to the spec?
I mean, I've told the app server (by using commit option A) that no one
else but the app server is touching the database. So... if the app
server has an entity with say the primary key xyz and I'm doing a
findByPrimaryKey("xyz") then the app server should be able to look in
cache __first__ to see if it is there. If it is it also must be in
database (since commit option A). If it is not in cache, then execute
the exists-query against database and the normal stuff...
I've just enlighten a couple of java developers to use the
findByPrimaryKey() __as_much_as_possible__ to avoid db-access to start
using the cache at max. They where often using other findByXXX's
querying on non-pk but still unique fields. And then they tested it and
asked me - 'why is it still doing all those select count() stuff?'. And
I didn't actually know what to say...
Am I wrong? Or perhaps this is handled different in JBoss 3 serie
(actually don't tested it - shame on me)?
/Lennart
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
This e-mail and any attachment is for authorised use by the
intended recipient(s) only. It may contain proprietary material,
confidential information and/or be subject to legal privilege.
It should not be copied, disclosed to, retained or used by, any
other party. If you are not an intended recipient then please
promptly delete this e-mail and any attachment and all copies and
inform the sender. Thank you.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
