What’s the difference between a tar file and a war file?
– TAR – derived from tape archive is a file format to archive bitstreams and name of a program to handle such files. It is commonly used to collect many files into one large file for distributing or archiving while preserving the filesystem info.
– WAR – web application archive is a jar file used to distribute a collection of JavaServer Pages, Java Servlets, Java classes, xml files, tag libraries, static web pages (html & others) and others resources that constitute a web application.
How do you look inside a jar file?
– jar –tf <filename.jar>
– What is a .war, .ear or a .jar file??
- WAR – web application archive is a jar file used to distribute a collection of JavaServer Pages, Java Servlets, Java classes, xml files, tag libraries, static web pages (html & others) and others resources that constitute a web application.
- JAR – Java Archive, is an archive file format typically used to aggregate many Java class files and associated metadata and resources into one file to distribute application software, libs on the Java platform.
- EAR – Enterprise Archive is used to package one or more moduels into a single archive so the deployment of the various modules into app server happen simultaneiously and coherently.
What is jboss EAP?
– JBoss Enterprise Application Platform is an open source implementation of the Java EE suite of services
How do you deploy an application to JBoss?
– Choose the server profile to which you want to deploy the application
– Copy your application (for example: .war or .ear or a .jar file) to JBOSS_HOME/server/<profilename>/deploy folder.
– Start the server: (./run.sh)
– JBoss will deploy your application when it boots up.
– That’s it!
How do you perform a hot deployment?
– JBoss has a built-in hot deployer which can:
- Detect new applications in the deploy folder and trigger an application deployment
- Detect an application which was removed from the deploy folder and trigger an application undeployment
- Detect that the deployment descriptor of an application (for example, the web.xml of .war or application.xml of .ear) has changed and trigger an application redeployment
How do you enable/disable a hot deployment?
– To enable, put file hdscanner-jboss-beans.xml in JBOSS_HOME/server/<profilename>/deploy
– To disable hot deployment, remove the hdscanner-jboss-beans. xml from the deploy folder or rename it to hdscanner-jbossbeans. xml.bak (.bak files are ignored).
How can you configure the time for the hot deployer?
– “scanPeriod” in hdscanner-jboss-beans.xml
How do you setup JBoss cluster??
– Getting started with JBoss clustering is very simple. If two JBoss server instances using the all configuration are started on the same network, those servers will detect each other and automatically form a cluster.
– Two application servers running on the same network detect each other auto and form cluster.
What do you check if you are having problems starting up JBoss?
– First thing to check is JAVA_HOME=????, then logs