1) This is an Orion addition which should be an EJB standard IMHO - it saves
untold amounts of time with persisting OR relations. If you want an EJB
standard approach you'll have to use something like TopLink or some other OR
persistence package (which is invariably a lot slower than Orion's
approach).
2) Method A will work fine.
Cheers,
Mike
australia.internet.com - http://australia.internet.com
Email: [EMAIL PROTECTED]
Phone: (612) 9251 3397
Fax: (612) 9251 2819
THE E-BUSINESS AND INTERNET TECHNOLOGY NETWORK
LATEST HEADLINES from australia.internet.com
- Disney Enters The Wonderful World Of eisa
http://australia.internet.com/aus-news/article/0,1087,121_340431,00.html
- Privacy Bill Draws Mixed Response
http://australia.internet.com/aus-news/article/0,1087,121_340201,00.html
- World.Net Plans To Grow Through IPO
http://australia.internet.com/aus-news/article/0,1087,121_340221,00.html
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Byron du Preez
Sent: Friday, April 14, 2000 3:52 PM
To: Orion-Interest
Subject: RE: Entity Bean with refs to other Entity Beans?
>No, no such thing is required - just make the field be of the remote
>interface type (ejbLoad/ejbStore is still empty) and it will be persisted
as
>the primary key of the entity in the db.
>/Magnus Stenman, the Orion team
Very neat feature.
1). Is this automatic persistence of associated entity fields an EJB
standard or an Orion addition (which should be an EJB standard)?
2). How do you set such a field?
class PortfolioEntity extends EntityBean
public Client client; // Remote interface to ClientEntity
public Client getClient() { return client; }
// METHOD A
public void setClient( Client client ) { this.client = client; }
// METHOD B
public void setClient( Long clientID )
try
this.client = getClientHome().findByPrimaryKey( clientID );
}
catch( Exception ex ) { ... }
}
}
Is it possible to use METHOD A (my understanding is that one can't pass
around RMI remote references within the same JVM) or do we have to resort to
using primary keys (as in METHOD B) to set an associated bean?
Thanks in advance
Byron du Preez