|
|
|||||||||||||||||||||||||||||||||||||||||
Masoud Kalali's BlogApril 2006 ArchivesSimply backup and restore your domains in GlassFish Using GlassFish Command ConsolePosted by kalali on April 25, 2006 at 05:23 PM | Permalink | Comments (1)Do you ever though about creating a backup copy of your domains in GlassFish , for example before doing something unpredictable , meanwhile you like your domain because of its configurations ? here is simple steps to create backup and restore those backup. before we go any further you should know , domaindir that we see in many of asadmin commands has a default value its default value is : GlassFish_home/domains , in all of those commands that has domaindir parameter, if you explicitly do not identify the domaindir asadmin will use the default values. So , when you use domain1 in some command , asadmin will look inside GlassFish_home/domains for that particular domain. steps to create a backup :
in case that you want to create a backup from a domain named domain1 (which is default domain) after you execute this command , asadmin will create a folder named backups inside GlassFish_home/domains/domain1 and place a zip file there. The zip file is a backup of your domain . For example the zip file could be : sjsas_backup_v00001.zip it means that it is first backup that you create for this domain. if you open the zip file you can see a file named backup.properties which contain informations like : #Backup Status #Wed Apr 26 01:00:40 IRDT 2006 timestamp.human=Wed Apr 26 01\:00\:40 IRDT 2006 domain.name=domain1 user.name=Masoud Kalali domain.dir=F\:\\glassfish\\domains\\domain1 domains.dir=F\:\\glassfish\\domains timestamp.msec=1146004240218 description=I made this backup before chaning default domain descriptor backup.file=F\:\\glassfish\\domains\\domain1\\backups\\sjsas_backup_v00001.zip There is a command which helps you to find out how much backups you have and shows you information related to each backup entry you made.This command is : list-backups it get an operand , the operand will be your domain name. You can also tell it that your domain dir is not the default place using --domaindir parameter. Now lets see how we can restore this backup using asadmin administration console. there is a command named restore-domain , this command will restore a domain using a backup file. Simply you need just to pass an operand which is your domain name. If you do this , it will restore your domain using your latest backup . So if I execute : restore-domain domain1 it will looks inside the backups folder (the default place) and select latest backup then it will try to restore the domain using that backup. you can use --filename parameter to specify another backup file which should be passed using a full path. I should say that this command accept domaindir parameter as other commands that we talked about them this time. overview of XML Parsing in java , different methods and librariesPosted by kalali on April 24, 2006 at 05:00 AM | Permalink | Comments (4)What Java provide you to pars XML files ? Iin this blog entry After answering the above questions , i will introduce (by name and method of parsing) some XML parser available in java land.we may talk more about each of them in next entries. First lets see what are different methods to pars XML files. There are Two major XML parsing method , one of them is Old and Standard method using a DOM (Documet Object Model) and the other is Stream and Event Based Parsing.
Parsers that we have had before StAX are push parsers, which parser push XML data to client whether it needs those data or not or even it is ready to recieve data or not. Pull Parsers which come along with StaX parsers provide another mechanism for letting Client to have the data . it give the ability of asking for XML data to client , so Client will recive Data when it asks for those Data. Now you should know that DOM / SAX are both push parsers , and the only pull parser implementation that i used is StAX. some features that make StAX a suitable parsing method when you need just to pars xml files while there is no need to create or update an XML file, you should know that StAX is one was parser as SAX parsers are.
1- It Extends XNI to provide pull parsing. An overview of Different Software development models with a deeper look at RUP Development modelPosted by kalali on April 20, 2006 at 03:27 PM | Permalink | Comments (0)Here is an Presentation that i made last year . it is about different lifecycle models like spiral , waterfall and iterative models. this presentation contain following contents :
you can get OO.org ODP from Here Hoping you find it useful. 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 . | |||||||||||||||||||||||||||||||||||||||||
|
|