td>
TR>
TABLE>
form>
body>
html>
J2EE application project:
To complete the J2EE project, we have to add some additional files. In 'application.xml' profile, this file is a configuration document for the J2EE project, refers to EJB packets and WAR Pack of the package.
The detailed code of 'Application.xml' is as follows:
XML Version = "1.0" encoding = "UTF-8"?>
Sum Application display-name>
FIBOEJB.JAR EJB>
module>
Fiboweb.war web-uri>
/ FIBO context-root>
web>
module>
application>
Package:
JBoss-IDE has a very convenient package setting, and is not limited. In the tutorial, the package setting will be set:
l An EJB JAR file. This file has EJB class, interface, and deployment files.
l A JAR file of an EJB client. Interface with EJB.
l A WAR file for a web app. There is a servlet, an EJB client's JAR and deployment profile.
l A JAR file for a J2EE project. There is an EJB JAR, Web App War, and deployment files.
When started, these four package settings generate J2EE project deployments.
Right-click the item to select 'Properties' ->' packaging configurations'. Tap 'add archive' in the right hand side window. Enter 'fiboejb.jar' and press' OK '. Now add a package settings generate' FIBOEJB. Jar 'file.
Now we have to add EJB classes and interfaces in 'fiboejb.jar', and those files in the 'src / bin' data clip (such as the output of the preset project). First choose 'FIBOEJB. Jar' Select 'add folder' in the right hand. In the pop-up window, you can choose a built-in or external folder, including or excluded files, pre-word, etc. Select 'Project Folder' -> '/ Tutorial / Bin '->' ok '. Included Fill in' Tutorial / EJB / *. Class, Tutorial / Interfaces / *. Class' -> 'OK'.
We want to deploy documents in 'Fiboejb.jar' Riga, choose 'FIBOEJB. Jar' to choose 'add file' in the right hand on the right. You can choose a built-in or external file in the pop-up window. Words and other settings. Choose 'Project File' -> '/Tutorial/Src/meta-inf/ejb-jar.xml' -> 'OK'. Prefix fills in 'meta-inf' -> 'OK '.
The above movement, this time the file is selected 'jboss.xml', the other, the package 'fiboejb.jar' is completed, as shown below:
Follow us to add an EJB client package setting. Datong, right-click on the right hand side window selection 'add archive'. Enter 'fiboejb-client.jar' to choose 'OK', then click 'Fiboejb-Client.jar' Add Folder 'Press' / Tutorial / Bin' in 'Project Folder', in 'Includes' Enter' Tutorial / Interfaces / *. Class' -> 'OK'. EJB Client's package has been completed:
Follow us to add a WAR package setting for Web App. Datong, right click on the right hand side window selection 'add archive'. Enter 'fiboweb.war' to choose 'OK', then click 'Fiboweb.war' Choose 'Add FiboWar' Press 'Project Folder' to select '/ tutorial / bin', in 'include' input 'tutorial / web / *. Class', 'prefix' input 'web-inf / class' -> 'ok'. Together with basic WAR configuration document, we have to choose 'fiboweb.war', right click on 'add file', select '/Tutorial/Src/web-inf/web.xml', and 'prefix' input 'web-inf'. Add another basic configuration document, select 'Fiboweb.war', right click on 'add file' to choose 'Porject File' select '/Tutorial/Src/web-inf/jboss-web.xml'. Plus EJB client JAR, choose 'Fiboweb.war', click on 'add file', select '/Tutorial/fiboejb-client.jar', although there is no 'fiboejb-client.jar' file, but can still add settings, And 'prefix' is to fill in 'Web-INF / LIB' -> 'OK'. Then the HTML file, select 'FIBOWEB.WAR', right to select 'add folder' selection '/ tutorial / doch', this is The content of the web app. The WAR package has been completed: to the EAR setting, the same, right pick the 'add archive', enter 'fiboApp.ear' and press 'OK'. Choose 'FIBOAPPP.EAR' right 'Add file' input '/Tutorial/src/meta-inf/application.xml', because this file is in 'meta-inf', so 'prefix' is filled in 'Meta-Inf' Press 'OK' To add an EJB module, select 'FIBOAPP.EAR' Right to select 'Add file' to fill in '/Tutorial/fiboejb.jar'. Although this archive is now Does not exist, but we can still join, press 'OK'. To add a web module, select 'FiboApp.ear' right picking 'add file' fill in '/Tutorial/fiBoweb.war'. Although this file is now Presented, but we can still join, press 'OK'. This EAR package has been completed:
After saving the information by 'ok', you will see a new file 'packaging-build.xml' in the project, which contains a complete J2EE project package setting.
You can now run the package, right-click the item to select 'Run Packaging', the console will display the following message, and there will be more JAR in the project, a WAR and an EAR profile:
JBoss-IDE 1.2.2 tutorial 6
JBoss-IDE 1.2.2 Tutorial 6:
JBoss settings and boots:
Now we have to set the JBoss server, press 'Debug' in the tool column.
If the JBoss server can be set at this time, press 'Debug'.
After pressing 'Debug', you will see the output information and if any errors can be seen, you can see the error message.
deploy:
JBoss-IDE has two ways to deploy:
l Copy the archive. Copy the resource file in the file administrator
l Locally deployed? MainDeployer MBean (in experiments). The URL of the resource file passed the Main Deployer MBean in Oral and Monitoring.
In addition, the deployed target unit is stored in the SESSION of Workbench, so you can redeploy or give up deployment in this goal.
The deployer Plugin from the demonstration setting will automatically add a file target. Other deployment goals can be defined.
Select 'Window' -> 'Preference' -> JBoss-IDE '->' Deployer 'in the main menu column to select the defined deployment target. The window in the upper right will list the file deployment target in the demonstration environment. The following is the user's customized deployment target. Suppose we will deploy the target of JBoss that has been defined, not the user's own custom. Steps simple, Package Explorer in the project, right-click 'FiboApp.ear' select 'deployment '->' deploy to ... ', there will be a window pop-up of selecting a target. After selecting a deployment target, there will be a message of' Deployment WAS Successful ', and you can also see the output information on the console window.
The resource file that is deployed after completion will add a small picture.
Insect:
Insect, it is important to set some breakpoints. Open 'Fibobobean.java' file. Double-click the left hand to add a breakpoint, we will be within the first line of the 'Compute' method.
In 'ComputeServlet.java', double-click the column of the left hand to add a breakpoint, it is scheduled before creating EJB.
Start JBoss in the demonstration environment, deploy 'fiboApp.ear' and set a browser, open a browser, enter 'http: // localhost: 8080 /' in the URL, while hostname and port need and JBoss server Set the same. You should see the following screen after input, enter a positive, press 'Compute'.
Then return to Eclipse's Workbench. You should see the operation of the program and stop in the breakpoint, you can track and monitor the operations step by step.
When the run is complete, the calculated result should be seen.
to sum up:
This is a simple tutorial to introduce the concept of JBoss-IDE. I hope to help you when you develop with JBoss-Ide.
Source:
http://prdownloads.sourceforge.net/jboss/tutorial 1.2.2.pdf?download
Tutorial origin:
http://prdownloads.sourceforge.net/jboss/tutorial_1.2.0.zip?download
转载请注明原文地址:https://www.9cbs.com/read-70539.html