File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes Session Facade with stateless session beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Session Facade with stateless session beans" Watch "Session Facade with stateless session beans" New topic

Session Facade with stateless session beans

Mohammed Ajmal

Joined: Sep 20, 2004
Posts: 29

I have a question regarding using session facade design pattern. I have gone through the tutorials it gave examples with sesssion facade with entity beans not stateless session beans. So, can I use session facade with stateless session beans.

I have developed some stateless session beans for Searching, RetrieveJobDetails and other functions separately as one session bean for every requirement.So I want to use the design patterns like Business delegate,Service Locato,Session facade.So,is it Ok if I use all these design patterns for my application.

Please throw some light and ideas/comments are appreciated.

Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Hi Mohammed,

Session fa�ade is meant to work with entity ejbs, as the name implies. Obviously if you�re not using entity ejbs, then you won�t develop a fa�ade but you�re probably using the JDBC for reading design pattern. Business delegate and service locator are also good idea and they should be part of any good design. You also need to design the data that must be exchanged between the server and the clients and you can look at the inter-tier data transfer patterns, like data transfer object, data transfer RowSet/HashMap, domain data transfer object, etc.
There is one more thing though. The jdbc for reading pattern is not actually a replacement for the session fa�ade. It supposed to be used (at least in theory) with BMP and especially when the application needs to display tabular data (it avoids the n + 1 entity calls problem, simplifies the development, etc). I know that people don�t feel comfortable using entity ejbs, but besides that is there any reason why you don�t want the use them?

I think, therefore I exist -- Rene Descartes
I agree. Here's the link:
subject: Session Facade with stateless session beans
It's not a secret anymore!