• Post Reply Bookmark Topic Watch Topic
  • New Topic

Can I use a Stateless Session Bean Facade for this situation?  RSS feed

 
Ken Rubin
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Does it make sense for a stateless Session Facade to make 2 calls as follows: (I'm pretty new at this)

1. Make one business call to do a database query, getting a failure or success then:

2. Pass this failure/sucess result back to client via a message driven bean.

This session bean does not need to hold state between client calls.

Thank you,

Ken
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it is ok, although not the most typical architecture unless an MDB was also the client that invoked the methods on the session facade in the first place. If a web app invoked the facade methods, usually you would just return info via the return value of the method. MDBs would typically only be used in cases where either you need to separate the webapp from the backend via a queue-based communications mechanism, or if there was a third party you wanted to notify as a side-effect (e.g. a logger or audit trail).
 
Ken Rubin
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the response Reid!
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!