Testing some FrameWorks and applications on Glassfish build 40+ part III

This time I want to test OSWorkflow on GlassFish , for this purpose I get latest version of this application , I mean osworkflow-2.8.0.
Lets see What a workFlow engine is and what is its usage , a workFlow Engine is an engine that is capable of executing WorkFlows in different level. a workFlow is a graph of works , so it means that a workFlow engine can execute a graph of works , this graph describe when , how and under which circumstance a node must be executed and/or which branch of graph should be followd.there are some standards for WorkFlow engine which you can find them in the web.
and you should know that there are really many WorkFlow engine in Opensource market 🙂 take a look at http://java-source.net/open-source/workflow-engines I find that some one add my weblog entries to GlassFish Wiki it looks like that I should explain more to allows every one to deploy this samples on GlassFish, so To follow this blog entry yourself you will need

lets start the job. At first I tried the sample application on tomcat 5.5.12 to make sure that it is working and it works well on Tomcat as I expect. Now lets start the GlassFish and open the likely admin console to easily deploy that application. I am right going to deploy osworkflow-2.8.0-example.war into GlassFish , lets see what will happen.
first step has done and now I can determine new context path and application name for this application ,osworkflow-2 is a bit long to be an application context name so I choose another context name for this application , something like OSW .I clicked next and application has deployed successfully , now lets see whether it runs with success or not.
Browser is open and I navigate to http://localhost:28080/osw/ nice , it looks like that it will works. You should see some page like the following :

Now lets see whether WorkFlow engine works correctly or not. To make sure lets load some test references by provided link in login page . So login with test/test and go to view your Works , you will see some defined Work that are waiting to mark as finish. After you create the reference data and logged in as test/test navigate to : http://localhost:28080/osw/underway.JSP you will see a page like the following (but not exactly the following because I finished some jobs) now you can finish some jobs and /or create some more items and watch them.

Now go back to manager page of OSW context I mean http://localhost:28080/osw/manager and create a new user for yourself . Add some works to system and terminate some of them to make sure your deployed sample works OK.
for me it works fine because I add several works and then terminate them.Something like :

Testing some FrameWorks and applications on Glassfish build 40+ part II

In this part I am going to test two other Open source frameworks on GlassFish. first of all I like to say that it is funny to test frameworks on GlassFish , at least until now , I faced no problem with deploying sample applications that come with frameworks distribution.
in this part I will test : OSCache from opensymphony and The famous Facelets .
but why I should test OSCache, and what is OSCache? let me tell you that it is a brilliant framework again from provider of WebWork and SiteMesh , it can cache what ever you like from a java object in middle layers to some part of your jsp/jsf? page in view layer. some of its features are as listed below:

  • Caching Dynamic Content : you can cache some part of a JSP pages between requests.
  • Caching Binary Content : cache heavy to generate contents like Charts that does not needs to be up-to-date
  • Error Tolerance : show cached content in case that a page encounter a problem and report the problem back to some administrator

I used OSCache for caching some parts of web pages and also to cache heavy to generate Charts for visitors of a web based system. In my case creating each chart needs several complex queries over a large Tables. On that time I used JFree Chart to handle chart creation and OSCache to cache The generated charts even for more than 24 Hours.
Now that I come to test each Frameworks that I used in past with GlassFish I decide to test OSCache to. So , I deployed the sample application that come with OSCache and it works.
To make it more likely I test the OSCache with JSF on GlassFish , it looks like that it works fine even with JSF but sure it needs more investigation to make sure that it works when we use JSF .
following image shows that I run the sample application that come with OSCache with an small change (using JSF core view to include all stuff showed in the page , using a backing bean and a binding for outputText value to show current TimeStamp).

Another framework that I test and I will talk about it in this entry is Facelets , but what is this framework and what can it do?in very brief Facelets bring some view related enhancement and features to JSF community .
To name some of features :

  1. Facelets make it possible to develop your entire web pages using your favorite page designer like Dreamweaver or Microsoft FrontPage. To achieve this feature it introduce a new attribute, jsfc ,that make it possible to change each HTML element to a JSF equal component. It is similar to Tapestry’s jwcid attribute. So you can use all binding and event handling stuff of JSF and availability and ease of use of HTML WYSIWYG.
  2. Facelets provide a template-ing features like Velocity’s for JSF . It allows you to test JSF views out of container.
  3. Some decoration features like what tile bring to struts community and SiteMesh ,generally, to all java based web application.

although I want to explain a bit more about feature number 1 , WYSIWYG HTML designers and Facelets. The designer should be able to produce XHTML , it means that the generated HTML file should comply with well-formed XML files syntax.For example all tags should be closed properly and no with brief model .
But Facelets is really a nice piece of works and a gift to JSF community. I Like too much to use Facelets in next jobs , but we should wait and see what customer want.
Now lets take a look and see what will happen when we try to deploy numberguess.war which come with Facelets Distribution.
sweet it just run , very good to see such such sweet deployment. I remember that first time which I have tried to deploy this numberguess.war which come from Facelets 1.0.11 on tomcat I faced some problem.When I looked inside web-inf/lib folder I find that here two implementation for JSF there , one was myfaces and the other was jsf-ri implementation. I removed the myfaces.jar and it runs.
this image shows what I have seen after I deployed numberguess.war into GlassFish.