SlideShare a Scribd company logo
1 of 19
JBOSS Application Server By Dilek Karadaş 09/05/2010
PLAN Application server definition Application server architecture Java application servers Advantages of application servers Jboss application server Jboss installation Jboss management Jboss shut down Deployment Run application Modify deployed application Undeploy
Application Server “Definition” An application server is a server program in a computer in a distributednetwork that provides the business logic for an application program. In a two-tier client/server environment, which is most common, the user's machine performs the business logic as well as the user interface, and the server provides the databaseprocessing. In a three-tier client/server environment, an application server provides middle tier processing between the user's machine and the database management system (DBMS).
Application Server “Architecture”
Java Application Servers Some of the better-known Java Enterprise Edition application servers include: Apache Geronimo (Apache Software Foundation) Apache Tomcat (Apache Software Foundation) Glassfish Application Server (Oracle Corporation) WebSphere Application Server and WebSphere Application Server Community Edition (IBM) JBoss (Red Hat) Jetty (Eclipse Foundation) JRun (Adobe Systems) Oracle OC4J (Oracle) WebLogic Server (Oracle) SAP Netweaver AS (ABAP/Java) (SAP) tc Server (SpringSource) Sun GlassFish Enterprise Server (based on GlassFish Application Server) (Oracle Corporation) Sybase Enterprise Application Server (Sybase Inc) Tcat Server (MuleSoft) WebObjects (Apple Inc.) JEUS (Tmaxsoft Inc.)
Advantages of Application Servers Dataand codeintegrity:  no risk of old versions of the application accessing or manipulating data in an older, incompatible manner.  Centralized configuration:  changes to the application configuration, such as a move of database server, or system settings, can take place centrally. Security: acentral point through which service-providers can manage access to data and portions of the application itself counts as a security benefit, devolving responsibility for authentication away from the potentially insecure client layer without exposing the database layer. Total Cost of Ownership (TCO):  in combination, the benefits above may result in cost savings to an organization developing enterprise applications. Transaction Support:atransaction represents a unit of activity in which many updates to resources (on the same or distributed data sources) can be made atomic (as an indivisible unit of work). End-users can benefit from a system-wide standard behavior, from reduced time to develop, and from reduced costs. As the server does a lot of the tedious code-generation, developers can focus on business logic.
JBoss Application Server JBoss Application Server is the #1 most widely used Java application server on the market. Because it is Java-based, the JBoss application server operates cross-platform: usable on any operating system that supports Java.  JBoss AS was developed by JBoss, now a division of Red Hat.
Jboss Application Server Installation First install Java 1.4 or Java 1.5 on your machine. Get Jboss from Jboss download page http://www.jboss.org/downloads/index Download archive file of Jboss for the version that you want to install. Extract Jboss archive to the location that you want to install your Jboss application server. You are now ready to start your jboss server by running run.bat file in the bindirectory of the jboss server. Port 8080 should be available on your machine, otherwise you need to change port configuration of the server. After start up finishes visit http://localhost:8080/ to be sure that your server is up and running.
Jboss Application Server Management JMX Console:JBoss application server provides a management application that lets you see and manage the services that are deployed and running inside the server. Console location: http://localhost:8080/jmx-console When you are there,  you will see that page:
Jboss Application Server Shutting Down Three possible ways to shut down the server:  Use the JMX Console to go to the jboss.system domain and choose the type=Server MBean link. On the MBean page, scroll down to the operations section and click the "Invoke" button for the shutdown( ) operation. Run the shutdown script for your platform in the same directory where you found the run script. Type Ctrl-c in the same console window where you started JBoss. When JBoss is stopped, you'll see the following message: 03:50:02,412 INFO [Server] Shutdown complete
Jboss Application Server Configuration JBoss provides several different configurations that range from a barebones server with no J2EE capabilities to a superserver with more services than any single application could possibly use. Minimal: This configuration provides the bare services you might need in the simplest application: logging, JNDI naming services, and URL deployment scanning. This configuration doesn't provide support for EJBs, web applications, JMS, or any other high-level services. Default:  This is a lightweight J2EE configuration; it's the one most people use. It provides most of the common J2EE services, but it doesn't include IIOP, JAXR, or clustering services, for example. These services can be added easily to this configuration. All: This configuration includes everything in JBoss. If you need any extra services not provided in the default configuration, this is the place to start. It's often easier to start from the all configuration and take out unwanted services than to start with the default configuration and add the desired services. You specify a particular configuration using the -c command to the run script. To run the minimal configuration, for example, use -c minimal.
Jboss Application Server Deployment Ant:  Ant is a build tool made with Java in mind, allowing Java developers to have a tool that fits with the Java environment and mentality. It is an expandable, open source tool that is constantly being upgraded and extended to support the latest Java standards. Go to page http://ant.apache.org/bindownload.cgi and download  a binary distribution of Ant. Unpack the distribution to your local machine. Set the ANT_HOME environment variable to point at the directory in which you unpacked Ant. ,[object Object],ant -version  Apache Ant version 1.6.2 compiled on July 16 2004
Jboss Application Server Deployment Create and package the application: Package= WAR file  WAR file structure:
Jboss Application Server Deployment Some important files for WAR: Web.xml: describes the web application and how the web container will deploy the application. 	Example: <?xml version="1.0" ?>  <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">  <servlet>  <servlet-name>QuoteServlet</servlet-name> <jsp-file>/quote.jsp</jsp-file> </servlet>  <servlet-mapping> <servlet-name>QuoteServlet</servlet-name> <url-pattern>/quote</url-pattern>  </servlet-mapping> </web-app>
Jboss Application Server Deployment build.xml: pulls together all the stuff for our application, and makes the WAR file. It also has tasks for deploying, undeploying and cleaning. Example:  <?xml version="1.0"?>  <project name="Hello World Buildfile" default="main" basedir=".">  <property name="top.dir" value="."/> <property name="src.dir" value="${top.dir}/src"/> <property name="lib.dir" value="${top.dir}/src/lib"/>  <property name="jboss.dir" value="/users/samjr/jboss-4.0.2"/>  <property name="jboss.deploy.dir“ value="${jboss.dir}/server/default/deploy"/> <target name="clean">  <echo message="In clean"/> <delete file="${top.dir}/quote.war"/></target>  <target name="main"> <echo message="In main"/>  <war warfile="quote.war" webxml="${src.dir}/metadata/web.xml">  <fileset dir="${src.dir}/appfiles"/>  <lib dir="${lib.dir}"/> </war>  <antcall target="deploy"/> </target>  <target name="deploy">  <echo message="In deploy"/>  <copy file="${top.dir}/quote.war" todir="${jboss.deploy.dir}"/> </target>  <target name="undeploy">  <echo message="In undeploy"/>  <delete> <fileset id="quote_wars" dir="${jboss.deploy.dir}" includes="*quote*.war"/> </delete> </target>  </project>
Jboss Application Server Running the Application Access to the application through Url: The path to use in the URL is based on the WAR file's name and the url-pattern from the servlet-mapping section in the web.xmlfile. http://hostName:port/application WarName/ServletName When you went to the URL for the application, the application compiled and created a servlet based on what is specified in the servlet section of the web.xml file. Then JBoss deployed that servlet and created a mapping based on the servlet-mapping section of the web.xmlfile. Again, the URL is based on the WAR filename created by the build (look in build.xml) and the URL pattern mapping in the web.xml file.
Jboss Application Server Modifying deployed application You are able to modify jsp’s and static contents withhout the need for redeployment.  You are not able modify deployment descriptor files without the need for redeployment.
Jboss Application ServerUndeployment Two ways to do that: Delete war file under deploy directory of Jboss server. Run undeploy ant target of the build.xml file.
Thanks..Questions?? For further reading on advanced topics, you can refer to JBoss: A Developer'sNotebook By Sam Griffith,  Norman Richards O'Reilly

More Related Content

What's hot

JBoss AS7 Overview
JBoss AS7 OverviewJBoss AS7 Overview
JBoss AS7 OverviewJBug Italy
 
EAP6 performance Tuning
EAP6 performance TuningEAP6 performance Tuning
EAP6 performance TuningPraveen Adupa
 
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.Dimitris Andreadis
 
JBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the UnionJBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the UnionDimitris Andreadis
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuseejlp12
 
JBoss Negotiation in AS7
JBoss Negotiation in AS7JBoss Negotiation in AS7
JBoss Negotiation in AS7Josef Cacek
 
Oracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsOracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsJames Bayer
 
An introduction to weblogic console
An introduction to weblogic consoleAn introduction to weblogic console
An introduction to weblogic consolebispsolutions
 
Java troubleshooting thread dump
Java troubleshooting thread dumpJava troubleshooting thread dump
Java troubleshooting thread dumpejlp12
 
weblogic perfomence tuning
weblogic perfomence tuningweblogic perfomence tuning
weblogic perfomence tuningprathap kumar
 
Weblogic 11g admin basic with screencast
Weblogic 11g admin basic with screencastWeblogic 11g admin basic with screencast
Weblogic 11g admin basic with screencastRajiv Gupta
 
JBoss Fuse - Fuse workshop EAP container
JBoss Fuse - Fuse workshop EAP containerJBoss Fuse - Fuse workshop EAP container
JBoss Fuse - Fuse workshop EAP containerChristina Lin
 
Architecting Large Enterprise Java Projects
Architecting Large Enterprise Java ProjectsArchitecting Large Enterprise Java Projects
Architecting Large Enterprise Java ProjectsMarkus Eisele
 
Oracle WebLogic Server 11g for IT OPS
Oracle WebLogic Server 11g for IT OPSOracle WebLogic Server 11g for IT OPS
Oracle WebLogic Server 11g for IT OPSRakesh Gujjarlapudi
 
JBoss AS7 web services
JBoss AS7 web servicesJBoss AS7 web services
JBoss AS7 web servicesalepalin
 

What's hot (19)

JBoss AS7 Overview
JBoss AS7 OverviewJBoss AS7 Overview
JBoss AS7 Overview
 
EAP6 performance Tuning
EAP6 performance TuningEAP6 performance Tuning
EAP6 performance Tuning
 
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
WildFly v9 - State of the Union Session at Voxxed, Istanbul, May/9th 2015.
 
JBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the UnionJBoss EAP / WildFly, State of the Union
JBoss EAP / WildFly, State of the Union
 
JBoss AS / EAP and Java EE6
JBoss AS / EAP and Java EE6JBoss AS / EAP and Java EE6
JBoss AS / EAP and Java EE6
 
RESTful web service with JBoss Fuse
RESTful web service with JBoss FuseRESTful web service with JBoss Fuse
RESTful web service with JBoss Fuse
 
JBoss Negotiation in AS7
JBoss Negotiation in AS7JBoss Negotiation in AS7
JBoss Negotiation in AS7
 
Oracle WebLogic 11g Topology
Oracle WebLogic 11g TopologyOracle WebLogic 11g Topology
Oracle WebLogic 11g Topology
 
Oracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic ConceptsOracle WebLogic Server Basic Concepts
Oracle WebLogic Server Basic Concepts
 
An introduction to weblogic console
An introduction to weblogic consoleAn introduction to weblogic console
An introduction to weblogic console
 
Java troubleshooting thread dump
Java troubleshooting thread dumpJava troubleshooting thread dump
Java troubleshooting thread dump
 
WebLogic FAQs
WebLogic FAQsWebLogic FAQs
WebLogic FAQs
 
weblogic perfomence tuning
weblogic perfomence tuningweblogic perfomence tuning
weblogic perfomence tuning
 
Weblogic 11g admin basic with screencast
Weblogic 11g admin basic with screencastWeblogic 11g admin basic with screencast
Weblogic 11g admin basic with screencast
 
JBoss Fuse - Fuse workshop EAP container
JBoss Fuse - Fuse workshop EAP containerJBoss Fuse - Fuse workshop EAP container
JBoss Fuse - Fuse workshop EAP container
 
Architecting Large Enterprise Java Projects
Architecting Large Enterprise Java ProjectsArchitecting Large Enterprise Java Projects
Architecting Large Enterprise Java Projects
 
Apache servicemix1
Apache servicemix1Apache servicemix1
Apache servicemix1
 
Oracle WebLogic Server 11g for IT OPS
Oracle WebLogic Server 11g for IT OPSOracle WebLogic Server 11g for IT OPS
Oracle WebLogic Server 11g for IT OPS
 
JBoss AS7 web services
JBoss AS7 web servicesJBoss AS7 web services
JBoss AS7 web services
 

Viewers also liked

JBoss presentation 2003 11 for matrix
JBoss presentation 2003 11 for matrixJBoss presentation 2003 11 for matrix
JBoss presentation 2003 11 for matrixrunsignup
 
JBoss Analyst tour Sept 2003
JBoss Analyst tour Sept 2003JBoss Analyst tour Sept 2003
JBoss Analyst tour Sept 2003runsignup
 
The JBoss Way, the Added Value of Open Source Middleware
The JBoss Way, the Added Value of Open Source MiddlewareThe JBoss Way, the Added Value of Open Source Middleware
The JBoss Way, the Added Value of Open Source MiddlewareEric D. Schabell
 
JBoss Enterprise Overview by Quinten Laureijs
JBoss Enterprise Overview by Quinten LaureijsJBoss Enterprise Overview by Quinten Laureijs
JBoss Enterprise Overview by Quinten LaureijsJoram Barrez
 
What makes JBoss AS7 tick?
What makes JBoss AS7 tick?What makes JBoss AS7 tick?
What makes JBoss AS7 tick?marius_bogoevici
 
JBoss BRMS - The enterprise platform for business logic
JBoss BRMS - The enterprise platform for business logicJBoss BRMS - The enterprise platform for business logic
JBoss BRMS - The enterprise platform for business logicJBug Italy
 
JBoss Application Server 7
JBoss Application Server 7JBoss Application Server 7
JBoss Application Server 7Ray Ploski
 

Viewers also liked (7)

JBoss presentation 2003 11 for matrix
JBoss presentation 2003 11 for matrixJBoss presentation 2003 11 for matrix
JBoss presentation 2003 11 for matrix
 
JBoss Analyst tour Sept 2003
JBoss Analyst tour Sept 2003JBoss Analyst tour Sept 2003
JBoss Analyst tour Sept 2003
 
The JBoss Way, the Added Value of Open Source Middleware
The JBoss Way, the Added Value of Open Source MiddlewareThe JBoss Way, the Added Value of Open Source Middleware
The JBoss Way, the Added Value of Open Source Middleware
 
JBoss Enterprise Overview by Quinten Laureijs
JBoss Enterprise Overview by Quinten LaureijsJBoss Enterprise Overview by Quinten Laureijs
JBoss Enterprise Overview by Quinten Laureijs
 
What makes JBoss AS7 tick?
What makes JBoss AS7 tick?What makes JBoss AS7 tick?
What makes JBoss AS7 tick?
 
JBoss BRMS - The enterprise platform for business logic
JBoss BRMS - The enterprise platform for business logicJBoss BRMS - The enterprise platform for business logic
JBoss BRMS - The enterprise platform for business logic
 
JBoss Application Server 7
JBoss Application Server 7JBoss Application Server 7
JBoss Application Server 7
 

Similar to Jboss App Server

Jboss Exploit
Jboss ExploitJboss Exploit
Jboss Exploitdrkimsky
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 serversMark Myers
 
Getting started guide
Getting started guideGetting started guide
Getting started guideBlueace1
 
Getting started guide1
Getting started guide1Getting started guide1
Getting started guide1Blueace1
 
Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questionspraveen_guda
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld PresentationDan Hinojosa
 
Java EE 02-First Servlet
Java EE 02-First ServletJava EE 02-First Servlet
Java EE 02-First ServletFernando Gil
 
Web Sphere Application Server Features
Web Sphere Application Server FeaturesWeb Sphere Application Server Features
Web Sphere Application Server FeaturesSymbyo Technologies
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts frameworks4al_com
 
Installing d space on windows
Installing d space on windowsInstalling d space on windows
Installing d space on windowsBibliounivbtn
 
APACHE
APACHEAPACHE
APACHEARJUN
 
Survey of restful web services frameworks
Survey of restful web services frameworksSurvey of restful web services frameworks
Survey of restful web services frameworksVijay Prasad Gupta
 
A DYNAMIC APPLICATION USING JBOSS
A DYNAMIC APPLICATION USING JBOSSA DYNAMIC APPLICATION USING JBOSS
A DYNAMIC APPLICATION USING JBOSSijcax
 
A DYNAMIC APPLICATION USING JBOSS
A DYNAMIC APPLICATION USING JBOSSA DYNAMIC APPLICATION USING JBOSS
A DYNAMIC APPLICATION USING JBOSSijcax
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administratorsSharon James
 
Dh2 Apps Training Part2
Dh2   Apps Training Part2Dh2   Apps Training Part2
Dh2 Apps Training Part2jamram82
 

Similar to Jboss App Server (20)

Jboss Exploit
Jboss ExploitJboss Exploit
Jboss Exploit
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 servers
 
Getting started guide
Getting started guideGetting started guide
Getting started guide
 
Getting started guide1
Getting started guide1Getting started guide1
Getting started guide1
 
Ibm web sphere application server interview questions
Ibm web sphere application server interview questionsIbm web sphere application server interview questions
Ibm web sphere application server interview questions
 
Jbossworld Presentation
Jbossworld PresentationJbossworld Presentation
Jbossworld Presentation
 
Java EE 02-First Servlet
Java EE 02-First ServletJava EE 02-First Servlet
Java EE 02-First Servlet
 
Web Sphere Application Server Features
Web Sphere Application Server FeaturesWeb Sphere Application Server Features
Web Sphere Application Server Features
 
My Saminar On Php
My Saminar On PhpMy Saminar On Php
My Saminar On Php
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
 
jboss_new resume
jboss_new resumejboss_new resume
jboss_new resume
 
Installing d space on windows
Installing d space on windowsInstalling d space on windows
Installing d space on windows
 
Servicemix4.5.0
Servicemix4.5.0Servicemix4.5.0
Servicemix4.5.0
 
APACHE
APACHEAPACHE
APACHE
 
Survey of restful web services frameworks
Survey of restful web services frameworksSurvey of restful web services frameworks
Survey of restful web services frameworks
 
A DYNAMIC APPLICATION USING JBOSS
A DYNAMIC APPLICATION USING JBOSSA DYNAMIC APPLICATION USING JBOSS
A DYNAMIC APPLICATION USING JBOSS
 
A DYNAMIC APPLICATION USING JBOSS
A DYNAMIC APPLICATION USING JBOSSA DYNAMIC APPLICATION USING JBOSS
A DYNAMIC APPLICATION USING JBOSS
 
Practical solutions for connections administrators
Practical solutions for connections administratorsPractical solutions for connections administrators
Practical solutions for connections administrators
 
AJppt.pptx
AJppt.pptxAJppt.pptx
AJppt.pptx
 
Dh2 Apps Training Part2
Dh2   Apps Training Part2Dh2   Apps Training Part2
Dh2 Apps Training Part2
 

Jboss App Server

  • 1. JBOSS Application Server By Dilek Karadaş 09/05/2010
  • 2. PLAN Application server definition Application server architecture Java application servers Advantages of application servers Jboss application server Jboss installation Jboss management Jboss shut down Deployment Run application Modify deployed application Undeploy
  • 3. Application Server “Definition” An application server is a server program in a computer in a distributednetwork that provides the business logic for an application program. In a two-tier client/server environment, which is most common, the user's machine performs the business logic as well as the user interface, and the server provides the databaseprocessing. In a three-tier client/server environment, an application server provides middle tier processing between the user's machine and the database management system (DBMS).
  • 5. Java Application Servers Some of the better-known Java Enterprise Edition application servers include: Apache Geronimo (Apache Software Foundation) Apache Tomcat (Apache Software Foundation) Glassfish Application Server (Oracle Corporation) WebSphere Application Server and WebSphere Application Server Community Edition (IBM) JBoss (Red Hat) Jetty (Eclipse Foundation) JRun (Adobe Systems) Oracle OC4J (Oracle) WebLogic Server (Oracle) SAP Netweaver AS (ABAP/Java) (SAP) tc Server (SpringSource) Sun GlassFish Enterprise Server (based on GlassFish Application Server) (Oracle Corporation) Sybase Enterprise Application Server (Sybase Inc) Tcat Server (MuleSoft) WebObjects (Apple Inc.) JEUS (Tmaxsoft Inc.)
  • 6. Advantages of Application Servers Dataand codeintegrity: no risk of old versions of the application accessing or manipulating data in an older, incompatible manner.  Centralized configuration: changes to the application configuration, such as a move of database server, or system settings, can take place centrally. Security: acentral point through which service-providers can manage access to data and portions of the application itself counts as a security benefit, devolving responsibility for authentication away from the potentially insecure client layer without exposing the database layer. Total Cost of Ownership (TCO): in combination, the benefits above may result in cost savings to an organization developing enterprise applications. Transaction Support:atransaction represents a unit of activity in which many updates to resources (on the same or distributed data sources) can be made atomic (as an indivisible unit of work). End-users can benefit from a system-wide standard behavior, from reduced time to develop, and from reduced costs. As the server does a lot of the tedious code-generation, developers can focus on business logic.
  • 7. JBoss Application Server JBoss Application Server is the #1 most widely used Java application server on the market. Because it is Java-based, the JBoss application server operates cross-platform: usable on any operating system that supports Java. JBoss AS was developed by JBoss, now a division of Red Hat.
  • 8. Jboss Application Server Installation First install Java 1.4 or Java 1.5 on your machine. Get Jboss from Jboss download page http://www.jboss.org/downloads/index Download archive file of Jboss for the version that you want to install. Extract Jboss archive to the location that you want to install your Jboss application server. You are now ready to start your jboss server by running run.bat file in the bindirectory of the jboss server. Port 8080 should be available on your machine, otherwise you need to change port configuration of the server. After start up finishes visit http://localhost:8080/ to be sure that your server is up and running.
  • 9. Jboss Application Server Management JMX Console:JBoss application server provides a management application that lets you see and manage the services that are deployed and running inside the server. Console location: http://localhost:8080/jmx-console When you are there, you will see that page:
  • 10. Jboss Application Server Shutting Down Three possible ways to shut down the server: Use the JMX Console to go to the jboss.system domain and choose the type=Server MBean link. On the MBean page, scroll down to the operations section and click the "Invoke" button for the shutdown( ) operation. Run the shutdown script for your platform in the same directory where you found the run script. Type Ctrl-c in the same console window where you started JBoss. When JBoss is stopped, you'll see the following message: 03:50:02,412 INFO [Server] Shutdown complete
  • 11. Jboss Application Server Configuration JBoss provides several different configurations that range from a barebones server with no J2EE capabilities to a superserver with more services than any single application could possibly use. Minimal: This configuration provides the bare services you might need in the simplest application: logging, JNDI naming services, and URL deployment scanning. This configuration doesn't provide support for EJBs, web applications, JMS, or any other high-level services. Default: This is a lightweight J2EE configuration; it's the one most people use. It provides most of the common J2EE services, but it doesn't include IIOP, JAXR, or clustering services, for example. These services can be added easily to this configuration. All: This configuration includes everything in JBoss. If you need any extra services not provided in the default configuration, this is the place to start. It's often easier to start from the all configuration and take out unwanted services than to start with the default configuration and add the desired services. You specify a particular configuration using the -c command to the run script. To run the minimal configuration, for example, use -c minimal.
  • 12.
  • 13. Jboss Application Server Deployment Create and package the application: Package= WAR file WAR file structure:
  • 14. Jboss Application Server Deployment Some important files for WAR: Web.xml: describes the web application and how the web container will deploy the application. Example: <?xml version="1.0" ?> <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4"> <servlet> <servlet-name>QuoteServlet</servlet-name> <jsp-file>/quote.jsp</jsp-file> </servlet> <servlet-mapping> <servlet-name>QuoteServlet</servlet-name> <url-pattern>/quote</url-pattern> </servlet-mapping> </web-app>
  • 15. Jboss Application Server Deployment build.xml: pulls together all the stuff for our application, and makes the WAR file. It also has tasks for deploying, undeploying and cleaning. Example: <?xml version="1.0"?> <project name="Hello World Buildfile" default="main" basedir="."> <property name="top.dir" value="."/> <property name="src.dir" value="${top.dir}/src"/> <property name="lib.dir" value="${top.dir}/src/lib"/> <property name="jboss.dir" value="/users/samjr/jboss-4.0.2"/> <property name="jboss.deploy.dir“ value="${jboss.dir}/server/default/deploy"/> <target name="clean"> <echo message="In clean"/> <delete file="${top.dir}/quote.war"/></target> <target name="main"> <echo message="In main"/> <war warfile="quote.war" webxml="${src.dir}/metadata/web.xml"> <fileset dir="${src.dir}/appfiles"/> <lib dir="${lib.dir}"/> </war> <antcall target="deploy"/> </target> <target name="deploy"> <echo message="In deploy"/> <copy file="${top.dir}/quote.war" todir="${jboss.deploy.dir}"/> </target> <target name="undeploy"> <echo message="In undeploy"/> <delete> <fileset id="quote_wars" dir="${jboss.deploy.dir}" includes="*quote*.war"/> </delete> </target> </project>
  • 16. Jboss Application Server Running the Application Access to the application through Url: The path to use in the URL is based on the WAR file's name and the url-pattern from the servlet-mapping section in the web.xmlfile. http://hostName:port/application WarName/ServletName When you went to the URL for the application, the application compiled and created a servlet based on what is specified in the servlet section of the web.xml file. Then JBoss deployed that servlet and created a mapping based on the servlet-mapping section of the web.xmlfile. Again, the URL is based on the WAR filename created by the build (look in build.xml) and the URL pattern mapping in the web.xml file.
  • 17. Jboss Application Server Modifying deployed application You are able to modify jsp’s and static contents withhout the need for redeployment. You are not able modify deployment descriptor files without the need for redeployment.
  • 18. Jboss Application ServerUndeployment Two ways to do that: Delete war file under deploy directory of Jboss server. Run undeploy ant target of the build.xml file.
  • 19. Thanks..Questions?? For further reading on advanced topics, you can refer to JBoss: A Developer'sNotebook By Sam Griffith, Norman Richards O'Reilly