Install and configure JBoss

Source: Internet
Author: User
Tags blank page

JBoss installation and configuration 1. JBoss configuration and installation 1.1 and JBoss download

JBoss: http://www.jboss.org /. The latest version is jboss2.2.1. We recommend that you download the integrated download packages of jboss2.2.1 and tomcat3.2.1 to avoid configuration issues between the two after a single download. Yes: http://prdownloads.sourceforge.net/jboss/JBoss-2.2.1_Tomcat-3.2.1.zip

After the download is complete, decompress the package to a directory named E:/program files/jb_tom (the directory name is customized by the author ). The following sub-directories are available:

E:/program files/jb_tom/JBoss and E:/jb_tom/tomcat

Note: The Directory here is slightly changed. We recommend that you add atat_home to classpath. Otherwise, the file "run_with_tomcat.bat" in E:/program files/jb_tom/JBoss must be modified to run properly.

1.2 configure run

Install JDK before starting JBoss. We recommend that you install JDK or later (the latest official version is JDK 1.3.1) and set the classpath of the system. JBoss should not be configured or modified. Of course, it is best to add tomcat_home to classpath. In this way, the tomcat_home file in E:/program files/jb_tom/JBoss before run_with_tomcat.bat can be removed.

Run the file run_with_tomcat.bat in E:/program files/jb_tom/JBoss. In this way, Tomcat port is 8080, JBoss is 8083, and http: // localhost: 8080/the Tomcat homepage appears. Running http: // localhost: 8083/will display a blank page without errors.

2. Test ejb2.1 and start JBoss:

The method is not described here, because ^ & ^ has been written before.

2.2 download and configure the EJB routine

To begin. Unpack the compressed package and the following directory appears:

Interest/COM

Interest/docs

......

Copy all the files in this directory to the examples directory under the JBoss installation directory. If there is no examples directory, create one by yourself. The structure is as follows:

E:/program files/jb_tom/JBoss/examples/interest...

Copy the file E:/program files/jb_tom/JBoss/examples/interest. jar to: e:/program files/jb_tom/JBoss/deploy.

Add the following file to classpath: e:/program files/jb_tom/tomcat/lib/servlet. jar; E:/program files/jb_tom/JBoss/client/jboss-client.jar; E:/program files/jb_tom/JBoss/client/jnp-client.jar; E: /program files/jb_tom/JBoss/lib/EXT/EJB. jar; E:/program files/jb_tom/JBoss/examples/interest/interest-client.jar

To test whether the client calls EJB through servlet, you must copy the EJB. Class and EJB. Java under: e:/program files/jb_tom/JBoss/examples/interest:

E:/program files/jb_tom/tomcat/webapps/root/WEB-INF/classes directory

Copy the directory e:/jb_tom/JBoss/examples/interest/COM and all the files under it to E: /program files/jb_tom/tomcat/webapps/root/WEB-INF/classes.

Restart jboss_tomcat.

2.3 Test and run the client under command:

Command to enter the directory e:/program files/jb_tom/JBoss/examples/interest

Java interestclient

:

Got Context

Got reference

Interest on 1000 units, at 10% per period, compounded over 2 periods is: 210.00000000000023

The JBoss window appears:

[Interest] Someone called 'calculatecompoundinterest! '

2.4 Test and run the Web Client through servlet:

HTTP: /localhost: 8080/servlet/EJB

:

Interest on 1000 units, at 10% per period, compounded over 2 periods is: 210.00000000000023

The JBoss window appears:

[Interest] Someone called 'calculatecompoundinterest! '

This operation is successful.

Note: Decompress jboss-2.2.1_tomcat-3.2.1.zip and copy it to the E:/program files/jb_tom directory.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.