Hi all, I havea simple CMP bean which stores Customer information. This bean has a transaction attribute of required. It is accessed in a session facade. Every time I call this finder, it executes SQL to retrive the customer. I thought that very first finder would cache the data and the subsequent calls to the finders would be served from this cache instead of accessing the database.
Is there any way I can avoide this behavior? Any help would be much appreciated. I have purchased and read the Admin docs. But that did not help. Or am I assuming the wrong thing here? I am using JDBCOptimistingLocking and a commit option of A. The finder defined as follows (xdoclet): @ejb.finder * query="SELECT DISTINCT OBJECT(c) FROM CUSTOMER as c where c.userID = ?1 AND c.active='Y'" * signature="com.customer.CustomerBean findByUserID(java.lang.String userID)" * * @jboss.query * query="SELECT DISTINCT OBJECT(c) FROM CUSTOMER as c where c.userID = ?1 AND c.active='Y'" * signature="com.customer.CustomerBean findByUserID(java.lang.String userID)" * read-ahead="true" * strategy="on-load" * page-size="100" This finder executes the following SQL every time it is called (same transaction): 2004-10-09 17:40:47,923 DEBUG [org.jboss.ejb.plugins.cmp.jdbc.JDBCJBossQLQuery.Customer#findByUserID] Executing SQL: SELECT DISTINCT t0_c.USER_ID FROM CUSTOMER t0_c WHERE (t0_c.USER_ID = ? AND t0_c.ACTIVE = 'Y') View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3850877#3850877 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3850877 ------------------------------------------------------- This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more http://productguide.itmanagersjournal.com/guidepromo.tmpl _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
