This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes WAF Web Controller and EJB Controller Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "WAF Web Controller and EJB Controller" Watch "WAF Web Controller and EJB Controller" New topic
Author

WAF Web Controller and EJB Controller

Qand Davaatsedev
Ranch Hand

Joined: Feb 06, 2002
Posts: 36
Hi,
My question is addressed to Blueprints' WAF gurus.
I wonder why does this WAF contain 3 controllers (Front, Web and EJB)?
Which J2EE patterns do Web Controller and EJB Controller represent?
Is EJB container a substitution for Session Facade?
I've read all Blueprints materials but was not able to find detailed WAF description.
Where does everything come from?
Thank you in advance if you can clarify.


Qand
xiaolin yu
Greenhorn

Joined: Nov 17, 2002
Posts: 20
Front Controller is the controller processes the Http request. Web Controller is the business delegate in web tier. EJB Controller is the session facade in EJB tier.
The reason you feel confused is that Sun used the command pattern to hide the transfer objects.
I spent a lot of time to analysis the Pet Store example. Sun should give us detailed UML pictures and code(JSP included).
Qand Davaatsedev
Ranch Hand

Joined: Feb 06, 2002
Posts: 36
Hi Xiaolin,
I like your interpretation of WC and EC but I cannot agree with you.
1) Because of Sun's naming conventions. They would never match Business Delegate - Web Conroller and Session Facade - EJB Controller names.
2) Business Delegate looks up Business Service and invokes its business methods. WC generates events and passes them to EC.
You are right it's not possible to find detailed UML diagrams for the Petstore anywhere.
BTW you can easily download all petstore source code including JSP from Blueprints site.
Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626

For detail WAF in petstore
I can u give u idea that how your webtire is gonna worked.
Every request passes through Filter class
In petstore SignOnFilter and Encoding Filter.
>SignOnFilter Class validate login and creating login by using stateless end entity beans.
>Also SignOnDAO class by reading signon signon.config file identifies protected and unprotected resources.
>Then request chains to EncodingFilter and then
to MainServlet for .do type or TemplateServlet
for .screen type.
For this web container internally uses mappings.xml file.This file is parsed by
using XMLDAO.
>.do request furture processes to appropriate htmlaction class
>If any ejb action is required then it generates
event and then event will pass to the EJBController class through WebController class.
The event object may be considered as a transfer objectst.
>now ejbController identifes which ejb action should be taken.
>for generating the screen ScreenFlowHandler class
uses screendefiniton.xml file which is parsed by
the corresponding dao class.
>then it is redirect to the Template servlet.
which then generate the appropriate jsp page by
using template.jsp file.
>and also all the request with the .screen extenstion goes directly to the TemplateServlet.

Then
 
Don't get me started about those stupid light bulbs.
 
subject: WAF Web Controller and EJB Controller
 
Similar Threads
Confused about Pet Store controllers and J2EE patterns
Simpler version of pet store
My WAF or their WAF?
Sun Rant
VLH of petstore