|
|
|||||||||
Masoud Kalali's BlogOpen Source ArchivesGlassFish is Open source , but how much Open it is ?Posted by kalali on May 09, 2006 at 02:07 AM | Permalink | Comments (0)We know that GlassFish is opensource under CDDL license , being opensource is good but having a good and open relation with community is very good. GlassFish has the most active community between opensource project that i have been involve a bit closer than observing , having that TheAquarium weblog make it magnifisant.Meanwhile you think that that weblogs is available in more that 3 languages, and it shows how much hard GlassFish people works to provide community with information that they need. its Wiki is a great source of information and shows how much far GlassFish people goes in making a good communication with the community. wiki pages update very often , you will find new information in its wiki / weblogs whenever you look at them.I think there is more with this glassfish to reveal than being just reference implementation of Java EE 5. if you check TheAquarium in a daily basis you will see that Glassfish components are going to Maven repository of java .net very fastly , and it means that we can use maven for our project which are based on java ee 5. Testing some FrameWorks and applications on Glassfish build 40+ part V , And some tips about Application deploymentPosted by kalali on April 11, 2006 at 03:02 PM | Permalink | Comments (1)It is a short entry that shows i used DWR Ajax Toolkit On GlassFish But to make the entry a bit more usefull , i would like to tell you how you can deploy an application to GlassFish . so far I know two methods that allows us to deploy application into GlassFish ,
asadmin start-domain it will start the application server default domain , in case that you did not change the administration port then you can access the web based admin console using http://127.0.0.1:4848/asadmin/admingui/TopFrameset after you loged in just in your left panel click on the web applications node , you will see that content frame shows you all deployed application and also provide some buttons to deploy new web application something like :
click on deploy and you will see the web application deployment page , here you can browse to WAR file ad select it to be deployed into current Domain.lets do it by selecting DWR.war which we download from DWR website. next image show how the war file deployment will looks like Now press next , and you will see that DWR is deployed very easily. Now you can naviate to Web applications node and see your DWR entry in web application list , lets check and see how does it works on glassfish. To check that it works on GlassFish it will be enough to run one of its samples. so do it yourself to see what happens. I for my sel JDate Sample as the first one and i saw that it works fine.
Now lets see how we can deploy the application using autodeploy folder , this folder is located in your domain folder somewhere like : you can use this folder to deploy all kind of applications , so you can put a war file inside that folder and GlassFish will deploy it for you , you can put an EAR file there and GlassFish will deploy it for you even You can deploy Resource Adapters (RAR files) using this folder. to test this folder , goto web administration console and inside web applications management page undeploy DWR project then come back here and put DWR.war inside autodeploy folder now go to web based management console and you will see DWR in deployed web application list. Now that you find out how this magic folder works , lets see how that administration Script ( asadmin.bat/sh) works for us. it is even easier than the previus one , you just need to call : Glassfish_Home/bin/asadmin deploy c:/DWR.war In next parts i will talk more about deploying application into GlassFish , we will see how an ear file or rar file can be deployed and be configured to works inside GlassFish . Testing some FrameWorks and applications on Glassfish build 40+ part IVPosted by kalali on March 31, 2006 at 03:00 PM | Permalink | Comments (2)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 :
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 ;-)
Testing some FrameWorks and applications on Glassfish build 40+ part IIIPosted by kalali on March 30, 2006 at 02:08 AM | Permalink | Comments (3)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
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 IIPosted by kalali on March 26, 2006 at 10:44 AM | Permalink | Comments (1)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:
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 :
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+Posted by kalali on March 25, 2006 at 03:39 PM | Permalink | Comments (4)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 | |||||||||
|
|