From Twitter

INSTALLING AND RUNNING APPLICATION SERVER FOR EJB  

Depending on the requirements of the organisation or company, one may select an
appropriate Application server. If organisation’s business processes span hundreds or
thousands of different computers and servers then, one can select good application servers
like BEA Web Logic, IBM Web Sphere and Oracle 9i Application Server etc. which are
licensed servers. But, on the other hand, if, the organisation is really small but still wants
to use EJBs due to future scalability requirements then, there are quite a few EJB
application servers from free and open source to the ones, which are fast, but with
reasonably low license fees. Examples of application servers, which are popular in small
organisations, include JBoss and Orion Application Server.

An application server is a conglomeration of software services that provide a runtime
environment for any number of containers, as shown in the Figure 2. A typical J2EE
application server, such as WebLogic, WebSphere, JBoss, and Sun's J2EE Reference
Server, houses a multitude of containers. WebLogic, for example, supports an EJB
container and a servlet container

            
    
























 The EJB container provides basic services, including transactions, life-cycle management,
and security, to the EJBs deployed into it. By shouldering much of this burdensome
lower-level functionality, the EJB container significantly reduces the responsibilities of
the EJBs deployed into it. Because EJBs no longer contain the code to provide these
fundamental behaviours, EJB developers are free to concentrate on writing code that
solves business problems instead of computer science problems.
 
Every application server vendor has its own way of deploying EJBs. They all share some
common traits, however, that are illustrated in Figure 3 and described here:

 • An EJB’s class (or sometimes its source code) files and its deployment descriptor
are placed into an archive, which is typically a JAR file. Deployment descriptors are
described in more depth in Part II, “Reference”.
 
• A deployment tool of some sort creates a deployable archive file (typically, but not
always, a JAR) from the contents of the archive created in Step 1.
 
• The deployable archive file is deployed into the EJB container by editing the
container's configuration file or by running an administrative interface program.

 
 There are many free application servers like Sun's J2EE Reference Application Server,
which is available free at http://www.javasoft.com. Or Jboss, which may be downloaded
JBoss from JBoss web site: www.jboss.org. Current stable version is 2.4.3. Download it
from their web site. Once you have downloaded it, unzip the JBoss zip file into some
directory e.g. C:\JBoss. The directory structure should be something like the following

 C:\JBoss
admin
bin
client
conf
db
deploy
lib
log
tmp

 Now, to start JBoss with default configuration go to JBoss/bin directory and run the
following command at the DOS prompt :


C:\JBoss\bin>run

run.bat is a batch file which starts the JBoss Server. Once JBoss Server starts, you should
see huge lines of text appearing on your command prompt screen. These lines show that
JBoss Server is starting. Once JBoss startup is complete you should see a message like
following one on your screen

[Default] JBoss 2.4.3 Started in 0m:11s

Now, we have successfully installed and run JBoss on your system. To stop JBoss, simply
press Ctrl + C on the command prompt and JBoss will stop, after displaying huge lines of
text

The client for our EJB will be a JSP page / Java Servelet running in a separate Tomcat
Server. We have already learnt in an earlier Block 1, how to create and install Tomcat
server for running JSP page or Servlet

Configuring and Running Tomcat

Create a new folder under the main C:\ drive and name it “Projects”. Now, create a new
sub-folder in the C:\Projects folder and name it "TomcatJBoss". The directory structure
should look like the following

C:\Projects
TomcatJBoss

Now, open conf/Server.xml file from within the Tomcat directory where you have
installed it. By default this location will be

C:\Program Files\Apache Tomcat 4.0\conf\server.xml

Somewhere in the middle where you can see multiple <Context> tags, add following lines
between other <Context> tags :

<!-- Tomcat JBoss Context -->
<Context path=”/jboss” docBase=“C:\Projects\TomcatJBoss\” debug=“0”
reloadable= “true” />

Now, save Server.xml file. Go to Start -> Programs -> Apache Tomcat 4.0 -> Start
Tomcat, to start Tomcat Server. If everything has been setup correctly, you should see the
following message on your command prompt:



No comments:

Post a Comment

Labels

(MCS-031 (6) 2011 (5) 4nf (1) 5nf (1) ACCESS CONTROL In Relational Database (1) ALGORITHMICS (5) assignment 2014 2015 (1) AVAILABLE TOOLS & ALGORITHMS (5) BCA (1) BINARY SEARCH (1) Block Nested Loop Join (1) Build and Fix Model (1) BUILDING BLOCKS OF ALGORITHMS (1) CHARACTERISTICS OF AN ALGORITHM (2) Core Java (1) Data Communication Network Security (1) DATABASE SECURITY (1) EER tool (1) ELEMEMTARY ALGORITHMICS (2) ENHANCED ER TOOLS (1) EVOLUTION (1) EXAMPLE OF AN ALGORITHM (2) Indexed Nested-Loop Join (1) install servelet engine (1) INTRODUCTION (1) Iterative Enhancement Model (1) Java Server Pages (1) JDBC (1) JSP (2) LEVELS OF DATABASE SECURITY (1) MCA (9) MCA 051 (1) MCA 3rd Semester (8) MCA 4th Semester (1) MCA 5 sem (1) MCS-031 (7) MCS-031 : DESIGN AND ANALYSIS OF ALGORITHM (14) MCS-032 (1) MCS-033 (1) MCS-034 (2) MCS-035 (1) mcs-041 (2) MCS-042 (1) mcs-043 (2) mcs-052 solved assignment (1) MCSL-036 (2) Nested loop join (1) OBJECTIVES (1) Operating System (2) OUTLINE OF ALGORITHMICS (1) Principles of Management and Information Systems (1) PROBLEMS (1) QUERY PROCESSING AND EVALUATION (1) Query processing Optimisation (1) Question Papers (8) Related Topic (9) relational Database (1) SELECT OPERATION Query Processing (1) Servlet (1) Servlet Programme (1) Servlet Programming (1) SOFTWARE DEVELOPMENT MODELS (4) SOFTWARE ENGINEERING (4) Solution (7) Solved Assignment 2013 2014 (6) SOME PRE-REQUISITES AND Asymptotic Bounds ASYMPTOTIC BOUNDS INTRODUCTION (1) STATISTICAL DATABASE SECURITY (1) structure (1) SUMMARY (1) Waterfall Model (1) Write a C program to print the following triangle (1)