Difference between EAR and WAR files

Difference between EAR and WAR files

*.war file – this file is a composition of servlet class files. This package is HTTP request/response capable, can be accessed by a URL and can return a page. The contents are Java Classes, JSP files, GIF ( for website images ), and HTML files. Can be deployed on a Tomcat or Jetty servlet container.

*.ear file – this file is the composition of a enterprise application, that is composed of several war and ear files that functions as a single application. ear files are usually complete with HTTP request/response capability, Database access, Exposed API’s and other fucntionalities. EAR files are deployed on application servers such as Weblogic, JBoss or IBM Websphere. If you deploy a war file on application server, it is wrapped to an ear file, for standard deployment.

*.jar file – is the basic java archive file. A compilation of Java Classes that functions as a single application. May include Java Classes only.

Here are some more detailed answers on stackoverflow.com
http://stackoverflow.com/questions/1594667/war-vs-ear-file

Advertisements

mkyong.com – websphere tricks

mkyong.com is a popular Java related tutorial website. Although you may not find a lot of Websphere topics in his site, or in the menu, he actually has some Websphere tricks hidden in his sleeve. There are only four entries for Websphere so far. I give you the topics below.

1.  Remote Debugging with Eclipse + WebSphere 7
2. How to increase WebSphere JVM memory
3. WebSphere 7 & javax/persistence/OneToMany.orphanRemoval() error
4. Metro on WebSphere 7 – com.ibm.xml.xlxp2.jaxb.JAXBContextImpl incompatible exception

You can view all Websphere topics in this URL:
http://www.mkyong.com/tag/websphere/

IBM Websphere Basics

Websphere debugging basics

location of logs:
>install_root/profiles/Appsrv01/logs

location of start/stop Websphere
>install_root/bin/startServer.sh
>install_root/bin/stopServer.sh

Change the order of classloader, when getting ClassNotFoundException
>applications/application_name/Manage Modules/module_name

Find the host name and port of the server
>Server/Server Types/WebSphere

WAS configuration files are found
>$install_root/profiles/$profile_name/config/cells/$cell_name

see this website here for complete debugging Websphere:
http://itdevworld.wordpress.com/2009/05/03/websphere-concepts-cell-node-cluster-server/

Organization of WAS cell and clustering

Node – is an organized app server.

Deployment Manager – the administrator (special node) of all WAS node/servers this group is called cell.

cluster – is a group of nodes. these nodes are grouped to for a more efficient load balancing inside the WAS http server. This does not include the Load balancer that accepts the internet HTTP request. the more cluster of nodes, it likely  to be distributed more inside the cell of multiple clusters

Clustering is better explained here
http://www.webspheretools.com/sites/webspheretools.nsf/docs/WebSphere+Cluster+versus+Load+Balance