Calling multiple entity beans in one session bean methods

Discussions

EJB programming & troubleshooting: Calling multiple entity beans in one session bean methods

  1. Hi,

    I have a problem while using OpenEJB. I have a stateless session bean in which i have following method:

    method() {
      Collection a = entitybeanA.getAllbyCapacity();
      while (a.next()) {
          print (entitybeanA)a;
      }
      Collection b entitybeanB.getAllbyCapacity();
      while(b.next() {
          print (entitybeanB)b;
      }
      
    }

    While printing a works fine, printing b gives class cast exception. Why? Is it the problem of container?

    Thanks
  2. Looks like you're missing an equals assignment after Collection b.
  3. Thanks. We found the problem. The missing equal was a type on the message board. The problem was with using Tomcat Ejbfactory to access ejb.