2 Replies Latest reply on Oct 3, 2001 5:35 AM by dan_s

    Problem in returning Vector or iterator from EJB to client s

    vipul_bscity

      After getting data from the DB, I am only able to send the data back to the client side as an collection object. I have tried sending it back as a Vector or iterator BUT can't.
      have anyone faced this. Is EJB running in JBOSS can only return collection Object to client side.I am using JBos 2.2.2 with JDK 1.3.1 and J2sdkee 1.2.

      Somthing similar I am facing while sending Form data to the EJB . I am not being able to send data in any of the obj either, Vector, Collection etc. I can only be able to send String or any of the premitive type.

      Pl present of your findings.

        • 1. Re: Problem in returning Vector or iterator from EJB to clie
          larry054

          It sounds like you are using a findBy method in an entity bean. They can return only Collections of keys by design. You need to wrap the entity bean in a session bean. Better yet, if you intend to return a number of rows, skip the entity bean altogether and just have the session bean populate an array or HashMap from a ResultSet.

          • 2. Re: Problem in returning Vector or iterator from EJB to clie
            dan_s

            I've had a similar problem - I am wrapping the entity bean in a session bean, the session bean returns an Iteration but still does not work. I get a 'not serializable' exception. Might consider populating an ArrayList manually in the session bean as you say - but does that not make multi-entity finders useless?