Passing Interface as an EJB parameter?
Hi: Is it legal to pass an interface like List as a parameter to a remote interface of an EJB? Conversely, how about returning an interace like List as the return type? Since List is an interface and not serializable, I wonder if it would be marshalled/unmarshalled correctly. Thanks, keith
Re: Passing Interface as an EJB parameter?
Legally You can declare return types any Interface though the interface may not be extending from Serializable. The marshalling and UnMarshalling happens on the object at runtime the object which you are returning must be serializable. Kesav Kumar - Original Message - From: Keith Kee [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Tuesday, January 08, 2002 10:26 AM Subject: Passing Interface as an EJB parameter? Hi: Is it legal to pass an interface like List as a parameter to a remote interface of an EJB? Conversely, how about returning an interace like List as the return type? Since List is an interface and not serializable, I wonder if it would be marshalled/unmarshalled correctly. Thanks, keith
Re: Passing Interface as an EJB parameter?
Keith Kee wrote: Hi: Is it legal to pass an interface like List as a parameter to a remote interface of an EJB? Conversely, how about returning an interace like List as the return type? Since List is an interface and not serializable, I wonder if it would be marshalled/unmarshalled correctly. Thanks, keith Yes, you can pass the Interface. The underlying object must be serializable, however. Personally, I use ArrayList in this scenario. -Steve -- Stephen Davidson Java Consultant Delphi Consultants, LLC http://www.delphis.com Phone: 214-696-6224 x208