1, JBoss configuration installation
1.1, jboss download
The download address of JBoss is: http://www.jboss.org/. The latest version is: JBoss2.2.1. It is recommended that you download the JBoss 2.2.1 and Tomcat3.2.1 integrated download packs, which avoids the problems configured between the two downloads. The download address is: http://prdownloads.SourceForge.Net/jboss/jboss-2.2.1_tomcat-3.2.1.zip
After the download is complete, unzip it to a directory, this directory name is E: Program FilesJB_TOM (this directory name is the author's own). There is a subdirectory below:
E: Program FilesJB_TomJboss and E: JB_TOM OMCAT
Note: The directory here is slightly changed. It is recommended that you add Tomcat_Home to classpath, otherwise, the Run_With_Tomcat.bat in program filesjb_tomjboss This file should be changed accordingly.
1.2, configuration operation
You should install JDK before starting JBoss, it is recommended to install version of JDK1.3 (currently the latest official version is JDK1.3.1), and then set the ClassPath of the system. JBoss does not have any configuration and modification, of course, it is best to add Tomcat_Home to classpath, so that E: program filesjb_tomjboss run_with_tomcat.bat in this file, Tomcat_home before this file can be removed.
Run E: program filesjb_tomjboss Run_with_tomcat.bat this file, this, Tomcat port is 8080, jboss is 8083, run http: // localhost: 8080 / will appear home, run http: // localhost: 8083 / will appear Wrong blank page.
2, test EJB
2. Start JBoss:
Method, this is not described here because it has been written in front of it.
2.2, download and configure the EJB routine
To http://www.wodejia.net/softdownload/java/interestejb.zip download INTERESTEJB.ZIP, which is our EJB routine for testing. Unlock the compressed package, the following directory appears:
Interest / COM
INTEREST / DOCS
......
In the Examples directory of all files in the directory to the jboss installation directory, if there is no examples directory, create one, the structure is as follows:
E: Program filesjb_tom jbossexampsinterest ...
Copy the files E: Program FilesJB_tomjbossexamplesinterestinterest.jar to: E: Program FilesJB_TomjbossDeploy.
Add the following documents in the Classpath: e: program filesjb_tom omcatlibservlet.jar; e: program filesjb_tomjbossclientjboss-client.jar; e: program filesjb_tomjbossclientjnp-client.jar; e: program filesjb_tomjbosslibextejb.jar; e: program filesjb_tomjbossexamplesinterestinterest-client.jar To test Client calls EJB through servlet, you must: E: Program filesjb_tomjbossexamplex, ejb.class and ejb.java copy to:
E: Program filesjb_tom omcatwebappsrootweb-infclasses directory
Copy the directory E: JB_TOMJBOSSEXAMPLESINTERESTCOM and all the files below to E: Program FilesJB_TOM OMCATWEBAPPSROOTWEB-INFCLASES.
Restart JBoss_Tomcat.
2.3, CLIENT Test Run under Command:
Under Command, enter the directory E: Program filesjb_tomjbossexamplexamplex
Java InterestClient
Will appear:
Got Context
Got Reference
Interest on 1000 Units, AT 10% Period, Compounded over 2 Periods IS: 210.00000000000023
The JBOSS window will appear:
[INTEREST] Someone Called `CalculateCompoundINTEREST! '
2.4, WEB Client runs through the servlet test:
http: // localhost: 8080 / servlet / ejb
Will appear:
Interest on 1000 Units, AT 10% Period, Compounded over 2 Periods IS: 210.00000000000023
The JBOSS window will appear:
[INTEREST] Someone Called `CalculateCompoundINTEREST! '
It has been successful.
Note: JBoss-2.2.1_tomcat-3.2.1.zip is decompressed and copied to the E: Program FilesJB_TOM directory.