File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JBoss/WildFly and the fly likes Application deployment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "Application deployment" Watch "Application deployment" New topic
Author

Application deployment

Caly LeeAnn
Ranch Hand

Joined: Nov 22, 2005
Posts: 55
I am using JBoss 4.0.4 application server. I am confused the ways that an applicaiton can be deployed.

1. An application can be deployed as a war file under ${JBOSS_HOME}/server/all or default;

2. An application can be deployed under its own directory, e.g. ${JBOSS_HOME}/server/myApp, which is an explored directory. It can include sar files, jar files, jsp/html files, properties files, xml configuration files, etc.

What should I be based on to decide which way to use?

And what is sar file, e.g. ushMonitor.sar?

Any advice will help. Thank you.
Milan Jagatiya
Ranch Hand

Joined: Jan 01, 2007
Posts: 164

I am using JBoss 4.0.4 application server. I am confused the ways that an applicaiton can be deployed.

1. An application can be deployed as a war file under ${JBOSS_HOME}/server/all or default;


The "default" configuration is the one that fulfills the J2EE 1.4 spec, so it is a good place for most developers to start.

The "minimal" configuration is nothing but a JNDI and a Log4j service.

The "All" having everything in the minimal and default configurations, plus advanced services like clustering.

so if you are not using advanced services like clustering...better use "default" configuration.


And what is sar file, e.g. ushMonitor.sar?


Services can be added and removed from a running JBoss instance through the use of JMX (Java Management Extensions). JMX is a framework that allows you to interact with live, running code. You can start and stop services and even change parameters on the fly.

Services that implement the JMX interface are called "managed beans," or MBeans. Each of the J2EE services that run inside of JBoss is an MBean.

Complex MBeans that require more than a simple XML file and a JAR in the lib/ directory can be deployed as a SAR (Service ARchive).
Tomcat is a good example of this. Change to the jbossweb-tomcat50.sar/ directory, and you'll find the traditional server.xml file used to configure Tomcat, along with all of its dependent libraries.

hope you got your answer....


Milan.<br />I can because I think I can...
Caly LeeAnn
Ranch Hand

Joined: Nov 22, 2005
Posts: 55
Thank you for your reply. That helps.

I am still a bit confused about the explored directory. For example, what is the reason to make a explored directory myApp.war instead of just the war file version of myApp.war? The same to the sar file. jbossweb-tomcat55.sar is a explored directory but for example ushMonitor.sar is one sar file.

And what is ear file? what is the purpose of using either a ear file or a explored directory like myApp.ear. I saw a deployment structure of an application was like this:

${JBOSS_HOME}/server/entApp/
|- conf
|- data
|- deploy
| |- ent.jar (explored directory)
| | |- ent.ear (explored directory)
| | | |- ent.war (explored directory)
| | | | |- {.jsp, .html}
| | | | |- WEB-INF
| | | | | |- lib (third party .jar)
| | | | ... ...
| | | |- ent-ejb.jar (one jar file)
| | | ... ...
| | |- entMonitor.sar (one sar file)
... ... ... ... ...

Is this a good practice?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10097
    
164

Having an exploded directory helps in redeploying your application easily without having to restart the application server. Here are a few links which might help:
ExplodedDeployment

Redeploy an exploded application

Deploy Tips


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Application deployment