Hi All, I'm trying to improve performance of the CMP part of my application.
I need to just count the number of "ToDoTask" with the severity property set to 'Error' and which are generated by an "IntegrityRule". For this, I wrote this code in the IntegrityRuleEJBBean: /** * @ejb.interface-method view-type = "both" */ public int countErrorTasks(){ try { return ejbSelectCountErrorTasks(this.getId()); } catch (FinderException e) { return 0; } } /** * @ejb.select query="SELECT COUNT(t) FROM IntegrityRule r, IN(r.tasks) t WHERE t.severity='Error' and r.id=?1" * @ejb.interface-method view-type = "both" */ public abstract int ejbSelectCountErrorTasks(Long ruleId) throws FinderException; As you can see, the "countErrorTasks" method is just a wrapper method to mask the getId() call. How can I build by the select query to use directly the id of the current IntegrityRule? Because the ejbSelect runs "out of" the bean instance... Any help would be appreciated.... Alban. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3928445#3928445 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3928445 ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user