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

This time i want to setup and test a utility that i am using with my Application server to mange them and monitor them.
Utility that i will use is Mc4j A very powerful and flexible jmx console built on top of Netbeans Platform .
so to follow this blog entry you will need GlassFish build 40+ , although i am testing it on buid 42 .Also you will need to have Mc4j version 1.2 beta 9 or newer.
first lets see what is JMX in very brief JMX like other java Stuff is an standard with some JSR related to it that handle requirement to manage java based applications in an standard and unified way it will allows to create powerful distributed management and monitoring system across different servers and aplications.
if you use jmx rule to build your configuration system then your application could be managed via any standard JMX console and any other application can interact with your application management system in an standard way.
How this become possible ? indeed you provide some java classes which are named managed beans or simply MBeans that provide access to other obects (mainly exposed or configurable objects) or your system. each MBean then register in another Object which is named MBean server.
? An MBean server with some services to handle MBeans compose a JMX Agent.this JMX agent provide facilities that remote application could communicate and manage your application.
but why we use JMXTechnology . i think some of reasons for using jmx is :

  • It provice an standard way to manage applications.
  • the architecture is well though and easily extendable.
  • You can integrate it with other management system because of its non intrusive nature.

For me , it is really suite that i use one application as a management console to manage my servers and applications that are running on them.
Lets see how we can use Mc4j to manage GlassFish. If you run mc4j you will see that it provide opens up and bring a friendly environment like netbeans. something like :

To access Glassfish management trough JMX you need to register the GlassFish as a server in mc4j , so in management menu choose create server connection. a dialog will opens let it be there. now go to your GlassFish installation bin directory. execute asadmin start-domain in case that you have one domain in your application server then that domain will start and a page like the following will shown up.

as you see in the image and in your own console window it shows up something related to jmx in your console , a url that you will use to access the JMX agent of glassFish trough mc4J copy that url and goto mc4j wizard window.
configure the MC4J wizard window like the following image by selecting the SJSAS as server type and pasring that url in server url, now you will need just to enteruser name and password which by default are admin/adminadmin. now you shoule be able to see a window much like the following one , as you can see , in left panel there come a glassFish node which is lighted with green. it means that mc4j is connected to this server and you can monitor / manage this server using mc4j.

Extend the GlassFish Node and you will see manything there.You can view the server JVM status , and also you can view the server resources itself. to view the server resources you will need to extpand the MBeans / amx node which is main node for GlassFish management.
Happy exploration
some images from my own explorations 😉

What you can do when you are netbeans based..

dynamic Pool size chart

Dynamic Pool usage Chart

Look which action we have over OSWorkFlow web application in this MBean

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.

Testing some FrameWorks and applications on Glassfish build 40+

Now with EJB 3 , (I am talking about current date take a look at date that this entry is written) options in application server market are so limited because there are just few application server that support EJB3. some of them that i know are Jboss and GlassFish project.
But GlassFish provide more than beeing EJB3 container , it is aimed to be a full Java ee 5 container.
GlassFish uses TopLink for persistance ,Contributed by ORACLE, so I think when we come to performance it is compareable with JBoss AS that uses Hibernate Persistance Engine to provide EJB3.
In a series of weblog i will deploy some of frameworks that i used in past with Other Application server and servlet container in GlassFish.
First of all I tried to run my favorite Open source Portal on Sun application server 8.1 ,8.2 but it does not works without workaround.but now in glassFish it deployed as sweet as a candy.
StringBeans Portal use Hibernate as ORM framework so it is database agnostic.Hope they convert the persistance layer to EJB3 . StringBeans Portal is a very clean and innovative implementation of jsr-168 portlet container with many features that you can relay on them for your next portal based job.
It is StringBeans Portal version 3.1 alpha that i checked on GlassFish . it is really very superior in comparesion with older versions .although older versions of this product was great too.
following image shows its running on GlassFish build 40.

Another framework which i tests on GlassFish is SiteMesh A great web-page layout and decoration framework . I use it with classic JSP/Servlet cases and also with Struts . I am really happy that i know this framework.
I thought when i tried StringBeans Portal lets test one other neat framework so i deployed sample war file that come with SiteMesh distribution on GlassFish , and it runs with no needs for modification. next image show that sample application running on GlassFish
Follwing image shows Sitemesh running on GlassFish

I want to share an RUP presentation that I have made before …

I saw that there is a poll in java.Net about Software development process. sure I vote in favor of Process that I have work in its framework before (RUP) and I prefer to work in adhere to its rules. And now I wan to share a fast overview presentation about RUP with users that like to know this process and need a very straight and simple to follow presentation. The presentation come in 68 pages and cover the following issues.

-Terms and definitions
-What is RUP?
-Key aspect of RUP
-6 Best practices
-RUP Architecture
-Dynamic aspect
-Static Aspect
-RUP Workflows
-Software Architecture
-RUP The Product

I provide the ODP format for download.
get the ODP from : http://dl.dropbox.com/u/334201/jn-blog-files/RUP%20presentation.odp

By the way , do you noticed that how much smaller an ODP file is ?

A New Module for Netbeans IDE , an statistical CVS Reporter…

2 weeks ago I was looking at www.sourceforge.Net for a utility that allows me to get some statistical information from CVS repositories. There are some commercial products that do this job in a very perfect manner , but those are commercial and feature over loaded.after some search I find VCS Report , I get the package and get some chart from my CVS repositories.
Some days ago I get the source code of the project and looked at the source ,Amazing , it uses a NetBeans library to connect to CVS servers , but there is no NetBeans plugin available in the download section , so I start and create a plugin for NetBeans , although it is in very early step and throw some exceptions some times but it works fine with NetBeans . I will put it in my UC in next few days after i make sure that i change it to comply with NetBeans in some acceptable degrees.
so far I create a TopComponent that contain the reporting stuff ,you can View image .
Now Configuration system (saving and loading your previous settings) and CVS setup dialog are ordinary swing dialogs instead of NetBeans specific dialogs, indeed these are exact clone of original VCS Report dialogs.
CVS setup dialog is like :

Password request dialog for CVS is like :

Current Feature of plugin Comply with VCS Report features , and sure the plugin will contain all features that VCSreport implements in future as soon as possible.

  1. Customizable filters
  2. History table
  3. Statistical charts
  4. HTML reports
  5. CSV (Comma delimited) reports

For next steps(before I make this plugin public) I thought to add at least half of the following features and enhancements.

  1. Both panels which are lied in north section should be converted into a wizard , so you start a wizard and it helps you to prepare a report step by step
  2. CVS setup dialog should be converted to NetBeans Standard CVS setup dialog
  3. It should be able to read CVS profiles that you have made in your NetBeans IDE. Like some other articles , blog posts ,… That contain an integration issue this plugin need more integration 😉
  4. Configuration files should be NetBeans standard configuration
  5. Tasks , should be converted to NetBeans standard Tasks
  6. Nor original software nor this plugin contain a progress bar , I think it should have some indicator that tell it is processing , even for very small portion of time
  7. Change i18n to comply with NetBeans i18n standards

I have some long term feature list which are depended on 3rd party softwares (at least I think that they depend on 3rd party softwares like NetBeans and VCS Report )

  1. SVN (Subversion) support
  2. CVS SSH support
  3. More statistical charts
  4. XML reports
  5. Also I thought about using JFree Chart instead of Charts that created by the software author , Jfree Chart has much more advanced charting engine and it gives user more feature to build better software , but it will make the module bigger in download size

i made this post because i am looking for some comments from developers who have knowledge about CVS internal mechanism. so if any one from the community have any suggestion , then let me know. I will add it to my ToDo list for future releases , and sure try to use your advice / comments , i will be more happy if my first release has more useability.