Objective
This article is written for readers who want to do EJB development in the JBoss environment, and you'd better have a basic understanding of EJBS before you read this article.
JBoss is an open source free EJB server that implements most of the features that other Java EE provides, Now that the Sun company has put JBoss as a j2ee1.4 standard to implement the server, this article will lead you to start from the installation of Jboss3.2.6, until the development of a complete "Hello,world" EJB.
Setup and start-up of JBoss
If you are using JBoss for the first time, you must be frustrated because it is open source and can be downloaded free of charge, but its documentation or technical training is charged, and for the Chinese people are not high (a few days training about 10000 U.S. dollars, documents are dozens of to hundreds of beautiful)! If you try to find some articles on the web that are easy to get started with JBoss, there are only a few, and few rookie-level articles. On the contrary, the most highly theoretical articles, such as its core design, make you look more and more confused. So the purpose of this article is to get your jboss to run as fast as possible and to develop simple ejb! on top of it.
Before you install JBoss, make sure that you have installed jdk1.3 or above, and that JBoss does not need JDK support to run because it is not bundled with JDK like WebLogic and other application servers. Then download an JBoss release (which I downloaded from jboss-3.2.6.zip) on the http://www.jboss.org Web site, the stable distribution I used in this article JBOSS3.2.6 (Integrated tomcat4.1), it needs to be added that Tomcat is the Apache Foundation's well-known open source Jsp/servlet server, if you want to learn more about Tomcat, please visit http://jakarta.apache.org For more detailed information.
When you download the Jboss-3.2.6.zip, the next step is to unzip it, if you are on Windows, you can use WinZip or WinRAR, if you are on Linux, use the unzip command, take me as an example, and suppose I unzip it to the following directory
C:\ jboss-3.2.6
Compared to Weblogic,websphere and other Java-EE servers, JBoss startup is simply unexpected, if you are a Windows user, just enter the C:\ jboss-3.2.6\bin below, Input Run.bat command, JBoss ran up, if it is a Linux user, only need to enter the C:\ jboss-3.2.6\bin below, input run.sh, then JBoss also run. What do you think? It's pretty simple, isn't it?
When you enter Run.bat or run.sh, you will find that the screen will continue to scroll some of the prompts, after about 1 minutes (depending on your machine configuration, mine is P4 1.7g,128m), the message will stop scrolling, as shown in the following figure:
(Note: If you are under Windows, then let this DOS window keep this state, do not stop it!) )
In this way, JBoss is already in the running state. Like other Java servers, JBoss also provides a web-mode console by typing http://127.0.0.1:8080/web-console/in IE, so you'll see a console as shown in the following illustration:
What do you think? This interface is no worse than WebLogic, right? Through this console, you can dynamically manage and monitor JBoss's services.