• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

FastLaneReader vs StatelessSessionBean for Search in FBN

 
shreyas patel
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What will be better if you consider performance as well as scalability?

StatelessSessionBean -> DAO
FastLaneReader(DAO)

StatelessSessionBean will be managed by Container and Pooled, so as per me it should be better.

Please suggest!
 
calvin zhu
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about FastLaneReaderSessionBean<<stateless>> -> DAO ?
 
shreyas patel
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As per my understanding, FastLaneReader pattern suggests to bypass Enterprise beans. And access DAO directly either from servlet or from simple java class(BusinessDeligate).
 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
FastLane Reader is recommend for high performance but the container capability which u would get if SLSB was implemented is lost. fast lane reader pattern with value list handler is recommened for the scenario of high performance search.


HTH
Dhiren
 
Ramon Gill
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I agree with you Dhiren. However, its interesting to note that the Petstore uses a SLSB for its catalogue searches (DAO's not entities). It does state that it could have used the web tier instead though.

Ray
 
Dhiren Joshi
Ranch Hand
Posts: 463
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Fast lane reader for pet store
Check this link. This shows exactly how Pet store implemented the fast lane reader options.

HTH
Dhiren
 
Ramon Gill
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dhiren,
Can't see any mention of 'Pet Store' in the link. The following link shows that 'Pet Store' uses a SLSB, not a Servlet. Look in section 1.2.5.4 'Catalog Module', directly under Figure 20.

http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/sample-app/sample-app1.3.1.html

Ray
 
aarti savant
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the ideal place to use Fast Lane readers. You are reading data from an external system which does NOT need updates. Why you need the overhead to create beans ???
 
Ramon Gill
Ranch Hand
Posts: 344
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can you use either servlets or SLSB for the fastlane reader. One reason for using SLSB is if you want to stick to the 'layers' technique (i.e. one layer can only talk to the next layer), which could rule out using a servlet. Another reason might be if you wanted to keep a cache on the EJB layer.
I think its down to the individual and the type of application as to what you choose.

Ray
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic