Hi Charles,
What is stopping you from doing this? Maybe I am be abit tired but I do not
see any problem with what you want to do. Please elaborate on the error. Is
is a compilation, deployment or runtime problem?
kind regards,
William Louth
> -----Original Message-----
> From: May Charles N [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, April 04, 2000 6:46 PM
> To: [EMAIL PROTECTED]
> Subject: ejbCreate parameters: not Serializable
>
> According to my reading, the parameters in an ejbCreate method must be
> "RMI
> ready", meaning they are either primitives, arrays of RMI-ready objects,
> implement java.io.Serializable, or implement java.rmi.Remote (for
> instance,
> another EJB Remote interface).
>
> I want an ejbCreate method which takes, among other things, an EJB Remote
> interface as an argument (to set up a required association for an entity
> bean). For example, a Division has a 1-to-many association with Policy.
> Then
> in the ejbCreate for PolicyBean, I want to pass an instance of a Division,
> along with the primary key data. For sheer object-oriented stubbornness I
> DO
> NOT want to pass the Division's primary key to PolicyBean's ejbCreate... I
> want to pass the Division itself. I want to leave it up to PolicyBean to
> extract the primary key from the Division and store it as an instance
> variable.
> Not only can I not get this to work, but I cannot find any examples of
> others doing this. It seems like all the examples I find either pass
> primary
> key data or pass a primary key itself (for the associated object) to
> ejbCreate when setting up an association. Yes, I could pass the primary
> key
> of the desired associated object rather than the handle of the object
> itself, and this works fine since the primary key implements Serializable.
> But it seems so data-centric rather than object oriented. Why use EJBs in
> the first place if I have to relegate myself to non-object oriented
> techniques? For this particular purpose I don't care about the implied
> callback to obtain the primary key to the associated class (which must
> then
> be stored as an instance variable, and of course could have been passed
> directly). I care that it seems like the callback SHOULD work and it
> doesn't. My environment is VisualAge 3.02 EE.
> Any helpful advice is appreciated.
>
> Charles May, Programmer/Analyst
> AFCO Credit Corp. - Pittsburgh Systems Group
> A Mellon Financial Company
>
> (The views represented in this message are my own, and do not necessarily
> represent the views of my employer).
>
> ==========================================================================
> =
> 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".
***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************
===========================================================================
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".