Richard,

Sure, but you can't use serialization.

In order for serialization to work, the graph (the image of the object from
the client) must be recreated on the server.  It's not enough to just have
the method signatures... what if the code performs some actions on the
data?  So, the server will need to have a copy of the class around so it can
run the code (and it then combines the code with the data from the client).

You might want to consider creating a data-holder object instead.  That
object would have a concrete implementation, and could both be marked as
serializable and would exist on both client and server.  The client could
wrap (but not extend) the implementation with whatever they needed.



Jonathan Baker



Richard Martin wrote:
>
> I have some session beans which, for some of their methods, take an interface.
> This interface is made available to the client code through our client jar.
> The client has written a class that implements this interface and is passing an 
>instance of that class in to the session bean. The session bean then blows up with a
> ClassNotFoundException, because it cannot find the defination of the client's class. 
>It also says RMI Class Loader disabled.
>
> Is there anyway of fixing this whilst maintaining a client-facing API declared in 
>terms of interfaces?
> Is enabling the RMI Class Loader the answer?
> What are the security implications of executing client-defined classes on the server?
>
> ==============================================================================
> This email and any files transmitted with it are confidential and intended solely 
>for the use of the individual or entity to whom they are addressed. All information 
>is the view of the individual and not necessarily the company. If you are not the 
>intended recipient you are hereby notified that any dissemination, distribution, or 
>copying of this communication and its attachments is strictly prohibited. If you have 
>received this email in error please notify:
> [EMAIL PROTECTED]
>
> ==============================================================================
>
> ===========================================================================
> 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".

--
Jonathan Baker

Senior Architect
eBusiness Division
Sybase, Inc.

[EMAIL PROTECTED]
+1 301 896 1363

===========================================================================
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