|
Hello ,
Johan is right by saying "Custom finders will always require a database roundtrip (most app
servers) even if the resulting row already has a representation in the cache".
As said in the specs for EJB 2.1
under section "10.5.3 Container�s View"
"public <primary key type or collection> ejbFind<METHOD>(...);.... The container
invokes the ejbFind<METHOD> method on an instance when a client invokes
a matching find<METHOD> method on the entity bean�s
home interface.
The container must
pick an instance that is in he pooled state (i.e., the
instance is not associated with any entity object identity)
for the execution of the ejbFind<METHOD>
method.
If there is no instance
in the pooled state, the container creates one and calls he
setEntityContext method on the instance before dispatching
the finder method. ......
Before invoking
the ejbFind<METHOD> method, the container must first
synchronize the state of those entity bean instances by invoking the
ejbStore method on them.
This requirement
does not apply to the ejbFindByPrimaryKey method.....
"
This means there can be
difference in performance between the customFinders and findByPrimaryKey
methods
As that the container has to/needs to sync
the states of all the beans by invoking ejbStore method, which amounts to
database roundtrip
thanks & regards,
Vikram Naik
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
|
Title: Re: Performance for Finders
- Performance for Finders Vikram Naik
- Re: Performance for Finders Johan Eltes
- Re: Performance for Finders Vikram Naik
- Re: Performance for Finders Kalra, Ashwani
- Re: Performance for Finders Johan Eltes
- Re: Performance for Finders Kalra, Ashwani
- Re: Performance for Finders Kalra, Ashwani
- Re: Performance for Finders Kalra, Ashwani
- Re: Performance for Finders Vikram Naik
- Re: Performance for Finders Vikram Naik
