How I may help
LinkedIn Profile Email me!
Call me using Skype client on your machine

Reload this page Java SASH (Struts Axis Spring Hibernate)

Here is a bottom-up explanation of Java without the sales hype. I'm working on organizing this better. Let me know what you find helpful or missing.


Topics this page:

  • What Is It?
  • Struts
  • JSF
  • Axis
  • Spring
  • Hibernate
  • SASH Tests
  • SASH Disto
  • Your comments???

    Site Map List all pages on this site 
    About this site About this site 
    Go to first topic Go to Bottom of this page

    Set screen The SASH Stack

      Internet Browsers (Internet Explorer, Firefox, etc.) Tiles JSTL Struts Taglibs Java Server Pages Struts Action Form Struts Action of MVC (Model View Controller) design pattern of MVC (Model View Controller) design pattern of MVC (Model View Controller) design pattern JSP Servlet Container The SASH stack for the Oness app "SASH" is an acronymn coined by SourceLab to describe a set of open-source Java Middleware software that enable POJO (Plain Old Java Objects) to use more light-weight and flexible objects for webapps: Apache Jakarta Struts, Apache Axis, Spring Framework, and Hibernate.

      Technology Purpose Developer Config. Forum
      SASH Integration Sourcelabs SASH 2.0 maven2 - Swik info
      S on this page Struts/JSF User Interface Apache Struts TLD (Tag Library Descriptor) file
      Swik info
      A on this page Axis Web services SOAP / WSDL Apache Axis - Swik info
      S on this page Spring SOA Backbone Spring - Swik info
      H on this page Hibernate Database Access (Persistance classes) hibernate.cfg.xml Swik info

      Add-ons include Terracotta for JVM clustering, Tangosol's Coherence Data Grid,

      Liferay Portal's architecture is based on the SASH stack:

    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Struts/JSF1/JSF2

      Struts structures the components of a Java-based Web application into a unified whole based on a robust MVC (Model View Controller) design pattern:

      • Model represents the data in a database.
      • View represents page presentation code,
      • Controller represents the navigational code,

      Its "separation of concerns" modularization makes it particularly useful so that a large team of web designers, system analysts, system engineers, database engineers can work in parallel.

      The "View" portion of this architecture has undergone very rapid series of improvements, from "Model 1" to "Model 2" to the component model of JSF (Java Server Faces), which many are adopting today instead of Struts. The race is to enable thin browser clients to be as highly interactive as fat Java client apps built using Swing.

      Struts is called "action based" because, being built on Sun's servlet API, a Struts form is intercepted in the server by a single instance (the "master" ActionServlet) that delegates actual work to subclasses of ActionForm and Action.

      Craig McClanahan at Sun created Struts as part of a project to internationalize an application. Struts also hasten development of Web applications' user input validation, error handling, reporting, and flow control. ActionServlet helper classes automatically take care of behind-the-scenes activities such as initializing Struts extensions (plug-ins), reading configuration data, and pooling Action subclasses (for efficiency).

      Craig went on to lead the development of Sun's JSF (Java Server Faces) spec first published in 2004. This first version of JSF introduced stateful and event-driven architecture versus Struts' stateless action architecture. JSF 1.2 is a part of J2EE 5.


      • Java Servlets were defined by Sun as programs written in Java that reside on a Web server and respond to user requests (much like CGI programs used to do). Servlet containers provided by software such as BEA or Tomcat take care of parsing HTTP requests, managing sessions, and compiling JavaServer Pages (JSPs).
      • JavaServer Pages (JSPs) generate Web pages with both static and dynamic content.
      • JavaBeans Components that follow specific rules, such as naming conventions.
      • Business logic code that implements the functionality or rules of specific applications, done by a custom subclass of class org.apache.struts.action.Action. Apache Struts

      Set screen JSF


      Struts builds on the JSP Standard Tag Library Expression Language (JSTL EL).

      Tracing what happens internally:

      1. The "calculator.jsp" URL (at a web host) typed into a client internet browser arrives at a web server (through DNS).
      2. The FacesServlet controller web server listener recongizes the jsp and restores the view from the component tree retrieved.
      3. Apply request values; process events Process validations; process events Update model values; process events Invoke application; process events Render response
      4. The "calculator.jsp" form contains markup:

            <h:form id="calcForm">
               <h:panelGrid columns="3">
                  <h:outputText for="firstNumber" value="First Number" />
                  <h:inputText   id="firstNumber" value="#{CalcBean.firstNumber}" required="true" />
                  <h:message    for="firstNumber" />

        The <f:view> announces a container managed by JSF.
        The <h:form> tells JSF to provide a form there.
        The <h:panelGrid> tells JSF to provide put a 3-column table in that form.
        The <h:inputText tells JSF to provide an input text entry box in that form, with a value from "calcBean".

        These <f: and <h: tags are prefixes to the tag library, defined at the top of the "calculator.jsp" file:

          <%@ taglib uri="" prefix="h" %>
          <%@ taglib uri="" prefix="f" %>

        Unlike a specification of where javascript libraries are located, these are not URLs to actual web pages at, but ???

      5. The index.jsp page.
      6. the web.xml and faces-config.xml file, found under the example application's src/webapp/WEB-INF directory.
      7. the Faces Servlet, and Faces Servlet mapping in the web.xml file.
      8. the faces-config.xml file in the web.xml file.
      9. what beans get managed by JSF in the faces-config.xml file.
      10. navigation rules in the faces-config.xml file.
      11. View the model object Calculator.
      12. the CalculatorController to talk to the Calculator model.

      The JSF v1 (Model 1 architecture) supported static include tags such as <jsp:useBean>.

      Unlike the XML in Struts' tag library, JSF tag library (JTLB) is event-driven, much like the architecture of Apple's WebObjects and Microsoft's

      Under JSF 2.0 that Sun open sourced under their CDDL license, .tag files in the WEB-INF/tags folder which provides compile-time checking for required parameters as they are compiled into tag handlers.

      Model backing beans map between view and model.

      tool JSF is the base for $799/year commercial tool Exadel's Visual (web) Component Platform Eclipsed-based Exadel Studio to enable developers to add AJAX capabilities without writing Javascript code. Its pre-built, customizable plugable RichFaces code defines user interfaces through one of 14 "skins" that define themed UI schemes (colors, fonts, corner sharpness, and 3D effects).

      Enhancements to the JSF-RI (Reference Implementation) components to build UI include MyFaces Tomahawk Extensions

      To avoid full page refreshes, Ajax4JSF is used to render and replace individual components in the single screen that JSF manages as a tree of components.

      Facelets JSF-oriented view technology is used to build a screen.

      MyFaces, at 1.1.3 with Shale, is dependent on the cactus 13-1.7.1 jar, junit 3.8.1 jar, and org.apache.struts.shale 1.0.2 jar test framework.


      JSF for nonbelievers: Clearing the FUD about JSF by Richard Hightower, CTO of ArcMind
      Ted Husted
      The JSF Central website
      The JSF FAQ website

    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Axis

      According to the README, AXIS stands for "Apache eXtensible Interaction System".

      Apache Axis is an implementation of the SOAP ("Simple Object Access Protocol") defined by the W3C that generates WSDL published by SOAP service providers. SOAP is a XML-based lightweight transport protocol that uses WSDL to represent remote procedure calls and responses in a decentralized, distributed environment. The SOAP specification defines the envelope framework for describing what is in a message and how to process it, a set of encoding rules for expressing instances of application-defined datatypes, and a convention for representing JAX-RPC API remote procedure calls and responses.

      (supported by WSO2) is a tool for building applications that use Web services in an SOA.

    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Spring

      Spring simplifies creation of server-side Java programs. Enforces decent software engineering practices and design patterns. Provide convenient wrappers for other technologies. It was conceived by Rod Johnson in his book "J2EE without EJB" and supported by Interface 21.

    Go to Top of this page.
    Previous topic this page
    Next topic this page

    Set screen Hibernate

      Hibernate Hibernate was originally written by Gavin King, who was hired by JBoss under RedHat.

      Is is now the time-tested leader among Open-Source ORM (object-relational mapping) layer java persistance solutions for writing Java programs that does “smart update” of databases. It creates CRUD+S SQL statements based on metadata, autogenerating Java classes (source code) which have mappings to database tables.

      Hibernate also simplifies parent-child persistence by doing “lazy” instantiation, (Semi) transparent data caching, and optimistic locking.

    Go to Top of this page.
    Previous topic this page
    Next topic this page

      Set screen The down side

      Using SourceLabs' pre-integrated libraries gives less "elbow room" for architects and developers to use less popular alternatives.

      As of this writing, Sourcelabs does not support other databases (such as MySQL) nor the Solaris OS platform.

      Another concern is whether Sourcelabs will be able to integrate and test new releases quickly enough. Here is a time-line:

        Release Component SASH
        End Dec 2006 Spring 2.0.2 -
        ? Apache Tomcat 6.0.x for JSP spec 2.5/2.1 -
        23 Nov 2006 Spring 2.0.1 -
        16 Nov 2006 Hibernate Core 3.2.1 GA -
        20 Oct 2006 Struts 2.0.1 Beta -
        ? Apache Tomcat 5.5.20 -
        17 Sep 2006 Struts 1.3.6 GA -
        22 Apr 2006 Axis 1.4 Final -
        05 Oct 2005 Axis 1.3 Final SASH 2.0
        22 Mar 2005 Struts 1.2.9 SASH 2.0
        15 Jun 2005 Axis 1.2.1 Final -
        08 May 2006 Spring 1.2.8 -
        04 May 2005 Axis 1.2 Final -
        ? Struts 1.2.7-3 SASH 2.0
        ? Apache Tomcat 5.5.15 SASH 2.0
        ? BEA WebLogic 8.1sp5 SASH 2.0
        ? Oracle 10g Release 3 SASH 2.0
        ? Hibernate Core 3.1.3-1 SASH 2.0
        ? Hibernate Core 3.0.5 SASH 1.1

    Go to Top of this page.
    Previous topic this page
    Next topic this page
    Set screen

      But SourceLabs' jars have one very important value over downloads directly from Apache: they include patches needed to overcome defects found by the seven types of testing SourceLab conducts. Among SourceLabs' comprehensive "CERT7" Test methodology which SourceLabs says include a load test of more than 54 million transactions over a period for nine days.

      Using Sourcelabs' integrated/tested build does not take the place of testing at each site because custom software still need to be verified and hardware are likely to be different and so require benchmarks to be recalibrated.

      However, SourceLab provides a great starting point for internal testing because private hardware and setup procedures can be validated against public benchmarks. Glaring deviations from public benchmark results would reveal symptoms of misconfigurations rather than being relegated to "that's just the way it is".

      Test Type Public
      Test Suite
      Test Suite
      1. Public Benchmark x - x - x -
      2. Hardware Validation - x x - x -
      3. Library Validation - x X - - x
      4. Service Validation - x - x - x

      SASH also provides a great starting point for testing custom internal apps because a test suite can be adapted much quicker rather than creating one from scratch, especially considering all the updating necessary as the libraries constantly evolve over time.

    Go to Top of this page.
    Previous topic this page
    Next topic this page

      Set screen Establishing a SASH Server

      Details about SourceLab SASH environment are described below according to the sequence they are created:

      1. Install the OS and associated drivers. SASH was tested on RHEL4 (Red Hat Enterprise Linux v4) Update 4 ? on all machines.
      2. Install the Java Runtime Environment (Java 1.5).
      3. Install the database management system. SASH was tested on a single-node (un-clustered) Oracle 10g.
      4. Install the servlet server. Stress tests of SASH 2.0 at Sourcelabs run all the major application servlet servers they support at the same time:
        • Apache Tomcat 5.5.15 (for Servlet/JSP Spec 2.4/2.0)
        • BEA WebLogic 8.1sp5
        • IBM WebSphere 6.0.2
        • Oracle Application Server 10g Release 3
      5. Install Apache Maven 2.0.4 (1 MB), becuase SourceLabs used it to publish the JAR as a Maven 2 repository.
      6. Download the, which includes SourceLab's dependability fixes for baseline open source projects compiled with Java Development Kit (JDK) 1.4.2.


    Go to Top of this page.
    Previous topic this page
    Next topic this page

      Set screen SASH Tests

      SourceLabs wrote several applications to test the SASH stack available from

      • LightNtact [swik] for functional, integration, and stress testing of the SASH stack.
      • KCRUD [swik] a simple web application which performs basic CRUDS (Create, Read, Update, Delete and Search) transactions that exercise JSF (JavaServer Faces)/Shale, Tapestry, and Struts UI frameworks against a simple object model.
      • ONess, [ swik] a "complete" solution for the textile commerce industry. with open-source ERP, CRM, SRM, and inventory management modules. Developed by Carlos Sanchez from Spain, who is no longer maintaining the app, last updated Dec 2004. By default it uses the HSQL in-memory database.
      • SASHSafari [swik] a multi-module web application Sourcelabs adapated from Sun’s "Adventure Builder" demo application to be implemented on top of the SASH stack and a J2EE servlet container to give a sense of how applications written for EJBs may be implementing using SASH instead. There are 4 major functional elements in SASH Safari: a consumer web site, an order processing controller, and bank credit card verification service, and an “activity supplier” for processing orders. As with most SASH applications, UI logic is built in Struts, business logic in Spring components, Hibernate is used for database communication and abstraction, and Axis is used for web services. Communication between Spring and Hibernate is accomplished using the Spring proxy based approach (rather than the Hibernate Template). Hibernate’s second-level cache is used together with a custom cache implementation. Java2WSDL is used to create WSDL descriptions from Java classes, and in turn the WSDLs are used with Axis to implement web services end points.

      [swik] is where tests results and source code are available on the SWiK.NET Open Source community for comment and re-use.

      Sourcelabs ran stress using Grinder for load injection and JMeter for lightweight apps.

      SourceLab's transaction-test framework are based on TPC-C schema that aims to simulate non-trivial real-world scenarios.

        To reduce the connection acquisition to the theoretical best case for connection pooling while still being able to tear down sessions and recreate them between each transaction, connection Pooling with Hibernate creates one connection per terminal, with terminals creating sessions using the SessionFactory.openSession(Connection connection) method.

      In competition to SourceLabs is SpikeSource, which focuses on the Linux OS. JAMon (Java Application Monitor)

      Apache Struts websites:


    Go to Top of this page.
    Next topic this page

    Set screen SASHDisto

      The SASH-1.2.dist folder consists of folders docs, licenses, sampleapps/sash-starter, and sash-1.2-repo.

      The "AppFuse" demo uses Spring's HibernateTemplate that is not efficient.

      The "Trails" demo is based on Tapestry.

      The SASH sample apps follow a strictly layered architecture:

      • Web framework with Struts iheriting from Http adapters ( Forms ), Action handler proxies ( Actions )
      • Business Layer of Spring managed POJOs – business logic;
      • ORM – data layer with Hibernate mappings;
      • External interface with Axis SOAP adapters;
      • Clustering and HTTPs

    Go to Top of this page.
    Next topic this page

    Portions ©Copyright 1996-2014 Wilson Mar. All rights reserved. | Privacy Policy |


  • Active Server Pages
  • Perl
  • Application Development
  • Web Projects
  • Javascript Coding
  • --------
    Set screen

    Go to Top of this page.
    Previous topic this page
    Link to Performance Engineer RSS 2.0 XML feed Atom 1.0 XML feed feeds
    for Software Developers ...

    Send a message with your email client program

    Visitor comments are owned by the poster.
    All trademarks and copyrights on this page are owned by their respective owners.
    The rest ©Copyright 1996-2011 Wilson Mar. All rights reserved.
    | | | |