Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Application deployment

 
Caly LeeAnn
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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....
 
Caly LeeAnn
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic