-
1. Re: findByPrimaryKey with read-ahead does not work as expect
ioparra Oct 23, 2003 4:11 PM (in response to rlorin)Which 3.2.2 are you using, the latest 3.2.2rc4? Try against that version and see what happens.
I recall making this work and saw the invalidation work across a cluster. Perhaps some more details will show up.
To confirm, you are running with:
CMP 2.x with cache invalidation
Commit A
on-find
QueuedPessimistic
no row-locking
As far as on-find per method:
Have you tried adding a read-ahead under the section to your jboss.xml findByPrimaryKey? The dtd says this:
<!ELEMENT query (description?, query-method,
(jboss-ql | dynamic-ql | declared-sql)?, read-ahead?)>
<!ELEMENT query-method (method-name, method-params)>
I don't recall if findByPK is handle by a special call, it may or may not? There's only a few ways to find out.
Good Luck.
-Ivan -
2. Re: findByPrimaryKey with read-ahead does not work as expect
seven Oct 24, 2003 2:42 AM (in response to rlorin)Are you calling the entity bean remotely? If the answer is yes, then this is expected since findByPk is in one TX and the business call is in another. Try to use session-facade pattern.
What stategy are you using for read-ahead(on-find or on-load)?
Regards,
Horia -
3. Re: findByPrimaryKey with read-ahead does not work as expect
rlorin Oct 24, 2003 6:18 AM (in response to rlorin)Hi,
The caller and the callee are in the same VM. The caller is a Web Application (war) calling the EJB.
I use read-ahead on-find straregy:
<read-ahead>
on-find
<page-size>1</page-size>
<eager-load-group>*</eager-load-group>
</read-ahead>
Thanks -
4. Re: findByPrimaryKey with read-ahead does not work as expect
rlorin Oct 24, 2003 6:30 AM (in response to rlorin)Hi and Thanks for your help,
I use the stable 3.2.2:
Release ID: JBoss [WonderLand] 3.2.2 (build: CVSTag=JBoss_3_2_2 date=200310182216)
I use the following container:
<configuration-name>Standard CMP 2.x EntityBean with cache invalidation</configuration-name>
which have it's default configuration with:
<locking-policy>org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock</locking-policy>
<commit-option>A</commit-option>
I use read-ahead with on-find strategy.
I have no row-locking specified (the default is supposed to be false).
I tryed to had the following query tag to my jboss.xml file:
<query-method>
<method-name>findByPrimaryKey</method-name>
<method-params>
<method-param>com.banqueagf.business.interfaces.LoanHabilitationPK</method-param>
</method-params>
</query-method>
<read-ahead>
on-find
<page-size>1</page-size>
<eager-load-group>*</eager-load-group>
</read-ahead>
but this does not activated read-ahead!
I tried to put it in my jbosscmp-jdbc.xml file and got the following exeption:
org.jboss.deployment.DeploymentException: Unknown query method : public abstract com.banqueagf.business.interfaces.LoanHabilitation com.banqueagf.business.interfaces.LoanHabilitationHome.findByPrimaryKey(com.banqueagf.business.interfaces.LoanHabilitationPK) throws java.rmi.RemoteException,javax.ejb.FinderException
anything else I should check or try?
Regards.
Ronan