Deploy J2EE Web Application with JBoss

xiaoxiao2021-03-06  20

If you have some J2EE applications that need to be deployed on iSeries, you don't need to pay for WebSphere. In fact, there is indeed a substitute for money. JBoss is an open source code implemented with 100% pure Java, compatible with standard Java 2 Enterprise Edition (J2EE) application servers. The JBoss server and its supplementary products are provided under public licenses. Moreover, JBoss has more than 150,000 downloads per month, so it can prove that it is the most downloaded J2EE-based server in the industry. This article is a simple tutorial that illustrates the process of installing the JBoss Java web application server on iSeries. We decided to use JBoss to Laurel's companies (Sullivan Software) to make "concept verification" for its iSeries customers. Because JBoss is freely open source software, we start from writing using Java Servlet, Java Server Pages (JSP), Enterprise JavaBeans (EJB 2.0), and Java Message Service (JMS) technology. Many of Sullivan have a small size but very successful company, which must carefully wear their calculation options. From a financial perspective, JBoss is best suited for them. We have extensive experience to different versions of WebSphere, Bea's WebLogic, and Visual Studio C # .NET, which helps us evaluate JBoss on iSeries. Once we complete the simple J2EE app for Sullivan Software's customers using JBoss, you know that some customers may want to purchase those applications and move them to WebSphere or WebLogic to utilize fast application tools and other features of those servers. . It is worth noting that we decided to create a separate environment for JBoss because we want to optimize the system resources and performance of the iSeries machine. This tutorial shows how to do this. Alternatively, another method is that you can run JBoss in an qshell session, but doing this has a more serious impact on ISERIES system resources and performance. So you should know that there are some alternative methods for setting JBoss on iSeries, we will describe it below. Before starting, check the iSeries system configuration before starting. JBOSS requires at least PTF level SF99510 C2134510 (with the latest "group PTF") OS / 400 V5R1M0. You also need IBM's Toolbox for Java (resource ID 5722JC1, * BASE option), IBM Developer Kit for Java (resource ID 5722JV1, * BASE option) and Java Developer Kit 1.3 (resource identifier 5722JV1, option 5). JBoss runs on the "Java Virtual Machine" version 1.3 or later. To install JBOSS, go to the JBoss homepage of http://www.jboss.org The following contains the compressed file that contains the version you want to use. We chose JBoss-3.0.3.zip package because it was the latest version at the time. There are many additional versions now, so you can also choose from version of JBoss-3.0.3.

Version 3.0.3 includes JBoss Web HTTP Server and JSP / Servlet Engines, EJBs, and other feature, requiring approximately 28 MB of storage space to be loaded. Version 3.0.3 is the Jetty as a JBoss version of the web component engine. There is a "Downloads" link on the left side of the page. Scroll down to JBoss 3.0 and select "JBoss-3.0.3.zip" under the package. You will ask you to select a mirror on the next page, which is used for the host copy site. You can choose any mirror site you want to use. Double-click the file icon under "Download", which will automatically download to your desktop. The next step is to deploy JBoss-3.0.3.zip files and extract them into the root directory of iSeries. To do this, map the network drive to the root directory of iSeries, then copy the JBoss-3.0.2.zip file from the desktop to the root directory of iSeries. Next, start the QShell interpreter on iShell by inputting strqsh commands. Make sure you are in the root directory and use the following command to extract the file: CD / JAR XF /WHERE/EVER/You/put/Jboss-3.0.3.zip (for example in the root directory, we use JAR XF / JBOSS- 3.0.3.zip) Indicates that the decompression has been completed when the QShell environment returns to the US dollar sign ('$'). The decompression process will construct a directory called JBoss-3.0.3. Switch to this directory and use the following commands to list these files and directories: CD JBoss-3.0.3ls You should see 5 directorys: BIN, Client, DOCS, LIB, and Server. Setting up a JBoss environment If all of these directorys exist, you are ready to use the following steps to set up a separate environment for JBoss: 1. Create a job queue for JBoss: Crtjobq Jobq (QGPL / JBOSS) Text ('Job Queue for JBoss 3.0.3 ') 2. Create run class for these jobs by entering the following command: CRTCLS CLS (QGPL / JBOSS) Runpty (25) Text (' JBoss Job Class') 3. Create a job to run the job by entering the following command JBoss subsystem description: CRTSBSD SBSD (QGPL / JBOSS) Pools ((1 * Base)) TEXT ('JBoss-3.0.3 J2EE Application Server Subsystem') 4. Add JBoss Add Jobs to JBoss: AddJobqe SBSD (QGPL / JBOSS) Jobq (* Nomax) 5. Adding a route entry for JBoss by entering the following command: addrtge sbsd (qgpl / jboss) seqnbr (9999) cmpval (* any) PGM (QCMD) Note that we use the default access port 8080 for JBoss-3.0.3. Your port 8080 may have been in use. This can be checked by using the TCP / IP Network Status command, the method is to enter NetStat on the command line. Use option 3 (using TCP / IP connection status). Press F14 to display the defined port number. If the port 8080 is already in use, view the "JBoss 3.0 Quick Start Guide" document provided on the JBoss Web site. It contains the contents of the chapter involves how to change the configuration of the default Jetty HTTP listener port 8080 and other HTTP listener port properties. Users should carefully read the contents of this section and follow the guidance given. //

Start and stop JBoss requires a script every time you start and stop JBOSS on iSeries. Figure 1 is a program called JBoss400.sh, which is used to start JBoss; Figure 2 shows endjboss400.sh, which is used to stop JBoss. (The electronic version of these utilities can be obtained in the following Website: http://www.iseriesnetwork.com/code). These scripts are deployed in the /jboss-3.0.3/bin directory on iSeries. Whether using the scripts we provide or using the scripts written by yourself, you should ensure that you have appropriate permissions to perform run.jar, run.sh, shutdown.jar, and shutdown.sh objects, these objects are built in decompression In the jboss- / bin directory. Use the following command in the iSeries QShell environment: CD / CD /JBOSS-3.0.3/bin chmod uog x run.jar chmod uog x run.sh chmod uog x jboss400.sh chmod uog x endjboss400.sh chmod uog x shutdown.jar chmod uog x shutdown.sh, we strongly recommend that you install Ant, which is a build tool utility for creating, compiling, and deploying JAR, WAR, and EAR files. It is also available for free. You can download Ant 1.5: http://jakarta.apache.org/. You should install it in the IFS root directory on iSeries. Now prepare to activate JBoss. You can start it using the following command, as shown in Figure 3: SBMJOB CMD (QSH CMD ('/ jboss- 3.0.3 / bin / jboss400.sh')) Job (Gojboss400) Jobq (QGPL / JBOSS) CPYENVVVAR * YES) ALWMLTTHD (* YES) When you want to cancel the JBoss, use the following command: SBMJOB CMD (QSH CMD ('/ jboss- 3.0.3 / bin / endjboss400.sh')) Job (Endjboss) Jobq (QGPL) / Jboss) CPYENVVAR (* YES) ALWMLTTHD (* YES) After activation, JBoss is 10 minutes to function. Starting and closing scripts generate a fake offline file (similar to the case in Figure 4), and you can observe what JBoss has done in the background. This is all content. If you follow these instructions, you now have a complete J2EE application environment running on iSeries - it is free. What you need to do is to deploy certain business logic in EJB, and then you should begin Java programming on iSeries. Our actual implementation is good for our customers, a mortgage company, and J2EE web applications. Customers are very satisfied with the Web application's ability to make a house loan rate and the HTML page generated by JSP display database information. SULLIVAN SOFTWARE's programmers benefit from learning using "EJB Query Language" (QL) EJB 2.0 technology and "container management persistence" (CMP) beans using "container management" (CMR) technology.

转载请注明原文地址:https://www.9cbs.com/read-60106.html

New Post(0)