2 Replies Latest reply on May 18, 2006 4:57 AM by Cyril JOUI

    EJB3 / ejbSelect / business methods?

    Marco Novice

      hi all,
      i m facing a little problem with ejb3.0..

      I have an EntityBean which is in CMR with an Item enityt bean (an expense is made of multiple items)

      public class Expense {


      public void setItems(Collection items) {

      public Collection getItems() {

      Now, i would like to write a method (getTotalAmount()) that does the sum of all the Items in an expense and return the total., andp ut this method ont he EntityBean (rather than on a Session)

      if i do that, jboss complians that no setter method has been defined for the totalAmount property

      am i putting the getTotalAmount method in the wrong bean? shall i put it ont he SessionBean instead?

      anyone could help?

      thanks and regards