Tuesday, March 27, 2007
Spring's IoC
Sunday, March 25, 2007
JSF Lifecycle
JSF Lifecycle Phases
1. Restore View
- If the request is first visit of page, builds the view of the page, wire event handlers and validator to each component in view and saves view in FacesContext
- If the action is post back, it restores the view which had already been created
2. Apply request values
- Recursively calls decode() on all the components in tree by extracting new values from request
- In case of conversion failure, stacks up error messages in faces context
- If there are any events queued up, notifies the interested listeners
- If any of the components have immediate attribute set to 'true', conversion, validation and events associated with component are done in this phase
- If the redirection to another web app or non-JSF page required, responseComplete() called on FacesContext
- If the validators or listeners call FacesContext’s renderResponse method, the lifecycle skips to render response phase.
3. Process Validations
- Registered validators on components triggered and error messages would be stacked into faces context if there are any validation issues
- If there are any events queued up, notifies the interested listeners
- If the redirection to another web app or non-JSF page required, responseComplete() called on FacesContext
- If the validators or listeners call FacesContext.renderResponse method, the lifecycle skips to render response phase.
4. Update model values phase
- Copies the values to backed bean properties
- In case of conversion issues, lifecycle advances to render response phase
- If the updateModels or listerners call FacesContext.renderResponse method, the lifecycle skips to render response phase.
- If there are any events queued up, notifies the interested listeners.
- If the redirection to another web app or non-JSF app required, responseComplete() called on FacesContext
- Invoke Application Phase
5. Handles the application level events
- If the redirection to another web app or non-JSF app required, responseComplete() called on FacesContext
6. Render Response Phase
- Renders the response
- If there are any validation errors, renders the error messages on page if there are messages tags.
Saturday, March 24, 2007
Coding with JSF is more OO
With JSF, managed beans concept is removing the extra class and giving flexibility to write the data and behavior in same class.
Sunday, September 24, 2006
Java Server Faces
I was looking into Apache Shale today. This framework is built on all JSF features. JSF can be used even with struts but it might introduce lot of redundant code. Struts design is with MVC2 pattern, which was invented almost 5 years back, and I think its time to move on to Shale framework for next generation of web application development for more flexibility.
Saturday, September 23, 2006
Points on Architecture
Why Draw an SSD?
An interesting and useful question in software design is this: What events are coming in to our system? Why? Because we have to design the software to handle these events (from the mouse, keyboard, another system, …) and execute a response.
Basically, a software system reacts to three things:
1) external events from actors (humans or computers),
2) timer events, and
3) faults or exceptions (which are often from external sources).
What is the Relationship Between SSDs and Use Cases?
An SSD shows system events for one scenario of a use case, therefore it is generated from inspection of a use case
What is the Logical Architecture? And Layers?
The logical architecture is the large-scale organization of the software classes into packages (or namespaces), subsystems, and layers. It's called the logical architecture because there's no decision about how these elements are deployed across different operating system processes or across physical computers in a network (these latter decisions are part of the deployment architecture).
A layer is a very coarse-grained grouping of classes, packages, or subsystems that has cohesive responsibility for a major aspect of the system. Also, layers are organized such that "higher" layers (such as the UI layer) call upon services of "lower" layers, but not normally vice versa.
Typically layers in an OO system include:
User Interface.
Application Logic and Domain Objects— software objects representing domain concepts (for example, a software class Sale) that fulfill application requirements, such as calculating a sale total.
Technical Services— general purpose objects and subsystems that provide supporting technical services, such as interfacing with a database or error logging. These services are usually application-independent and reusable across several systems.
Wednesday, September 20, 2006
Weblogic's Protocol handler
Sometimes, this solution is not acceptable in production environment unless and otherwise the upgrade to next version happens from product vender.
The service provider can be commented in java.security file:
security.provider.1=sun.security.provider.Sun
security.provider.2=com.sun.net.ssl.internal.ssl.Provider
security.provider.3=com.sun.rsajca.Provider
#security.provider.4=com.sun.crypto.provider.SunJCE
security.provider.4=sun.security.jgss.SunProvider
I am still in confusion with the behavior of weblogic's protocol handler. Eventhough the priority for SunJCE is 4, Still it is picking up SunJCE.
Tuesday, September 19, 2006
On Legacy Connectivity
IBM supports resource adapter that implements JCA version 1.0. Although not part of WebSphere Application Server, IBM supplies resource adapters for enterprise systems such as: the Customer Information Control System (CICS), Host On-Demand (HOD), Information Management System (IMS), Systems, Applications, and Products (SAP) R/3, and Crossworlds, as separate products.

If WebSphere Application Server is running on a distributed platform, you must use TCP/IP to connect to IMS Connect.
One way to develop a Java application is to write the application yourself, using the J2C Common Client Interface (CCI) provided by the IMS resource adapter.
Links:
http://java.sun.com/developer/technicalArticles/J2EE/connectorclient/resourceadapter.html http://www.onjava.com/pub/a/onjava/2004/03/24/j2eeca.html http://www.attunity.com/forums/jca-adapters/153-access-cics-ims-tuxedo-pathway-racle.html
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/Connector.html#wp79662
