May Charles N wrote:
> 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).

Correct.

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

We do this today with Weblogic 4.5.1.  Perhaps this is a limitation with
VisualAge?

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

(FWIW I'm in total agreement with you here.)

Cheers,
Laird

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