• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Some doubts about ActionBazaar sample application

 
Ismael Upright
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

In "EJB3 in Action" there is sample application named ActionBazaar. Here are my doubts:


1.
On the figure 2.2 (p.42) we can see that two operations "Billing" and "Order confirmation" are performed independently of each other and in parallel.

But on the other hand, in the begining of the chapter 2.2.2 there is a sentence: "One more process might be apparent: the backgroung billing process to charge the order, triggered by order confirmation". It looks for me that the "Order confirmation" is the predecessor operation to the "Billing" operation. So the figure 2.2 would look like that:

Place bid -> Bid end -> Order -> Order confirmation -> Billing -> Item shipped

What's up with that? Is it parallel or not?


2.
I'm not quite sure if this application is more like internet shop or rather internet auction?

- the story with Jenny and possible overbidding sounds like an auction

But:

- there is no overbidding mechanism like in the shop
- you have to confirm the order like in the shop (I always thought that on the auction simply bidding (or overbidding) is the confirmation as well and the person who won is obligated to pay... so there is no additional confirmation, just the info about winning the auction)




Thanks
 
Koji Muramoto
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ismael Upright:
Hello,

In "EJB3 in Action" there is sample application named ActionBazaar. Here are my doubts:


1.
On the figure 2.2 (p.42) we can see that two operations "Billing" and "Order confirmation" are performed independently of each other and in parallel.

But on the other hand, in the begining of the chapter 2.2.2 there is a sentence: "One more process might be apparent: the backgroung billing process to charge the order, triggered by order confirmation". It looks for me that the "Order confirmation" is the predecessor operation to the "Billing" operation. So the figure 2.2 would look like that:

Place bid -> Bid end -> Order -> Order confirmation -> Billing -> Item shipped

What's up with that? Is it parallel or not?


2.
I'm not quite sure if this application is more like internet shop or rather internet auction?

- the story with Jenny and possible overbidding sounds like an auction

But:

- there is no overbidding mechanism like in the shop
- you have to confirm the order like in the shop (I always thought that on the auction simply bidding (or overbidding) is the confirmation as well and the person who won is obligated to pay... so there is no additional confirmation, just the info about winning the auction)


Thanks


It is paralel in the sense that calling the Bill Order is done via a Message Producer, thus it just delegates to a MDB to do some hypotetical intensive operation like sending an email/updating a DB, but sending the message to a queue is almost a non-blocking operation.

If you look further at page 58 you'll see that the PlaceOrderBean first saves the order then sends a message to bill it:

saveOrder(order); (blocking)
billOrder(order); (almost non-blocking)

Not trully paralell but the confirmOrder() method should return much faster than executing the billOrder logic in the same method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic