Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help me in BMP Relations

Hussein Baghdadi
clojure forum advocate
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ranchers.
please I need some help here.
when developing a BMP with a 1:1 relation (in my case,ShipmentBean,
we can do the following :
public class OrderBean implements EntityBean {
private String pk;
private String name;
private Shipment sh; // EJB local stub
public void setShipment(Shipment) { //setting }
public Shipment getShipment( ) { //getting }
public void ejbLoad( ) {
// I know what I must do here
public void ejbStore() {
// I know what I must do here
in the client, I want to perform the following:
Collection c = orderHome.findByOrderName(name);
Iterator it = c.iterator( );
while (it.hasNext( )) {
// retrieve the stub
Shipment s = stub.getShipment( );
} }
will this approach work? I mean, when retrieveing an order local object,
and then calling getShipment( ), how this local object knows it's shipment information.
(I don't think that the container will call ejbLoad( ) first, then returning order local object).
or maybe, this approach will work correctly, I don't know!!
so help me please (maybe, there are extra steps in the bean's methods).
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic