I've seen a lot stuff like this:
An entity ejb returns a java.util.Collection to a session façade, and the session façade adds this collection to an java.util.ArrayList.
What's really the big deal on letting the client perform operations on Collections?
Thanks,
ltcmelo
-
ArrayList x Collection between EJB tiers (1 messages)
- Posted by: Leandro Melo
- Posted on: April 20 2004 16:59 EDT
Threaded Messages (1)
- ArrayList x Collection between EJB tiers by Paul Strack on April 20 2004 19:53 EDT
-
ArrayList x Collection between EJB tiers[ Go to top ]
- Posted by: Paul Strack
- Posted on: April 20 2004 19:53 EDT
- in response to Leandro Melo
The Collection returned by the Entity may be a proprietary Collection subclass available only on the server. Therefore, it may not be possible to serialize that Collection and send it to the client.
By having the Session Facade transfer data into a java.util.ArrayList, you ensure that the Collection is a standard Java collection, and therefore ensure that it will serialize and deserialize correctly.