JBoss needs an environment variable called "JAVA_HOME" to be set to the root installation of the JDK. This must be set before JBoss is run. The previous section explains how this is achieved. The JBoss installation used to test EJB 3.0 requires that the JDK be version 5.0 (or higher).
JBoss AS can be downloaded as a JAR file from http://labs.jboss.com/portal/jbossas/download.
NOTE: Since you want to use EJB 3.0, you MUST download the installer file.
NOTE: The latest avaiable version of JBoss standalone installer (which includes EJB 3.0) is 4.0.4, while the latest version of JBoss AS is 4.0.5.
You need to use the JEMS installer (http://labs.jboss.com/portal/jemsinstaller/downloads) to install the ejb3 profile in order to run EJB 3.0 applications on JBoss AS version 4.0.5.
The reason is that JBoss Inc is not legally allowed by Sun to bundle EJB 3.0 runtime in a certified J2EE 1.4 server (i.e., the JBoss AS 4.x).
NOTE: JBoss AS version 4.0.4 has problem with missing DeclareRoles security annotation. For this reason, the recommended JBoss AS version to use is 4.0.5.
The archive is an executable Java ARchive, when run it launches the JBoss installer Java Application. Depending on how Java has been installed it is possible to launch the installer by double clicking the JAR file. Otherwise a command line window is opened in the directory where the JBoss JAR file was downloaded, and Java is launched with the JBoss installer file as a parameter:
C:\temp> java -jar jems-installer-1.2.0.BETA3.jar
Click the Next button.
The installation folder path of JBoss should NOT contain spaces. On Windows Systems, the path "C:\Program Files\jboss-4.0.5.GA" is not advisable. Enter the "c:\jboss4" installation path:
It is important to have EJB 3.0 support installed. At the time of writing EJB 3.0 is still very new, and so MUST be explicitly selected instead of the "all" install type server option.
Choose the ejb3 profile when asked:
Click the Next button.
Configure DataSource to use default database (HSQLDB)
Click the Next button.
In the Configure JMX Security dialog enter the following:
Uncheck ALL checkboxes.
Enter admin username : admin
Enter admin password : admin
Click the Next button.
When the install is done, click the Next button and the Done button.
Running JBoss For The First Time
JBoss should be started, just to make sure the JDK and JBoss are installed correctly, and to allow JBoss to make any final installation steps it requires. This is done by entering "run.bat" at the command prompt, in the JBoss bin folder.
C:\jboss4\bin> run.bat =============================================================================== JBoss Bootstrap Environment JBOSS_HOME: C:\jboss4\bin\\.. JAVA: C:\Program Files\Java\jdk1.5.0_09\bin\java JAVA_OPTS: -Dprogram.name=run.bat -server -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 CLASSPATH: C:\Program Files\Java\jdk1.5.0_09\lib\tools.jar;C:\jboss4\bin\\run.jar =============================================================================== 13:15:29,623 INFO [Server] Starting JBoss (MX MicroKernel)... 13:15:29,623 INFO [Server] Release ID: JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339) 13:15:29,639 INFO [Server] Home Dir: C:\jboss4 13:15:29,639 INFO [Server] Home URL: file:/C:/jboss4/ [skipped] 13:16:10,013 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/ 13:16:10,779 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080 13:16:11,044 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009 13:16:11,076 INFO [JkMain] Jk running ID=0 time=0/94 config=null 13:16:11,107 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 41s:468ms
If the console window displayed some Java Exception stack trace(s), they need to be resolved.
To test that the server started correctly, a web browser is opened, and the following URL entered: http://localhost:8080/jmx-console/index.jsp, where localhost can be the name of the server on which JBoss was installed.
A successful installation displays the "JMX Agent View" page:
To stop the server, either Ctrl + C is pressed in the command prompt used to launch JBoss, or, a new command prompt is opened, and "shutdown.bat -S" is typed. In the JBoss command window, the output shows that JBoss AS has shut down:
C:\jboss4\bin> shutdown.bat -S Shutdown message has been posted to the server. Server shutdown may take a while - check logfiles for completion
13:17:40,152 INFO [Http11BaseProtocol] Stopping Coyote HTTP/1.1 on http-0.0.0.0-8080 13:17:40,168 INFO [TomcatDeployer] undeploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/ 13:17:40,168 INFO [TomcatDeployer] undeploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp22708jbossws-context-exp.war/ 13:17:40,168 INFO [TomcatDeployer] undeploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/ 13:17:41,058 INFO [Server] Shutdown complete Shutdown complete Halting VM
![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |