File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "WAF Web Controller and EJB Controller" Watch "WAF Web Controller and EJB Controller" New topic

WAF Web Controller and EJB Controller

Qand Davaatsedev
Ranch Hand

Joined: Feb 06, 2002
Posts: 36
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.

xiaolin yu

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.

I agree. Here's the link:
subject: WAF Web Controller and EJB Controller
It's not a secret anymore!