The EJB spec (1.1 spec section 9.1.8.2), allows for java.util.Enumeration to
be the return type of multi-object finders.  For the Enumeration to be
returnable, it must also be Serializable.   Does anyone know of a java.util
class that returns a Serializable Enumeration?

Its sort of odd that for example, java.util.Vector, which is itself
Serializable, does not return a Serializable Enumeration (Vector.elements()
returns a non-serializable Enumeration).

The problem with this for EJB is that unless there is a core java class
which can be used to return the Enumeration, then the Container must provide
such a class to the client.   Though this can be accomplished via dynamic
class loading by placing the Enumeration implementation into the same
codebase used to find the EJBHome and EJBObject stubs, it seems pretty ugly
to have to do this just for a single class.

BTW, the other option for multi-object finders is to return
java.util.Collection.  This does not have the problem that Enumeration has
since the Java 2 collection classes all seem to be Serializable.   The
problem here is that beans which implement this option will only work with
Java 2 clients.

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to