Build a J2EE application tutorial using JBoss and Eclipse
Foreword.
Translation: Raxy
This tutorial is about developing J2EE components as an application server using Eclipse as an integrated development environment. This tutorial is gradually introduced to the development of J2EE components, starting from installing Eclipse, JBoss, and Lomboz. Lomboz uses XDoclet (Attribute Oriented Programming) to quickly develop. Important, the tools used in the tutorial can be downloaded for free So there is nothing to hinder you!
Eclipse is an excellent IDE with many features such as reconstruction and debugging. JBoss is integrated in Eclipse using JBoss plug-ins. Lomboz is another plugin for developing J2EE components, which provides construction bean, method, bean deployment And test the wizard of the client, etc. JBoss is an application server that has a convenient built-in component such as Hypersonic database and network engine Jetty. These tools contain all key components in the J2EE environment to help beginners learn how to develop J2EE applications. Some skills have been obtained. After the confidence, beginners can also use tools with other manufacturers.
One problem in front of J2EE developers is how to make their code as the descriptor deployment (Descriptor). During the development of components, developers must keep synchronization with deployment descriptions, this lengthy and easy error Avoid, replaced is more considered for the application's business logic. XDoclets generate these interfaces and help classes by parsing the source files to synchronize deployment description. These files generate self-employed source code and their Javadoc tags Information of information. XDoclet allows developers to focus on a Java source file in each component, that is, focusing on the business logic of the application, and the rest is delivered to the xdoclet.
Many years developers are looking for a tool to accelerate for development and deployment, XDoclet is developed for this. You will find xdoclets to make development and deployment quickly and simple. Take a look at XDoclet, Eclipse, and JBoss combination Power!
About the author.
Glen McCallum.
Glen joined TUSC in 1990. He has a lot of experience in the communication industry software development field, including C, C , Perl and Java. In addition to TUSC's work, Glen is also dedicated to cool technology. These include TCP / IP Network, security, encryption, VPNS, digital image capture, Bluetooth technology, PDAS and J2EE, all based on Linux platform. His wife and two sons are completely "pure Linux" family.
Vishal Sharma.
Vishal was born in India in 1976. He studied the mechanical engineering in 1998. After 6 months working in this field, he came to Australia and obtained a master's degree in computer science. Since 2001 in Rmit Melbourne He first served as a software engineer in MCOM Solutions. Vishal joined TUSC in 2002 and started a lot of different projects from that. Recently he developed a multi-layer network application for the communication industry, where used is J2EE technology .
Acknowledgment.
We want to thank these friends: Rod Bower, Sebastian Bellofiore and Marcia Abbott, thank them for their support and help, of course, thank our colleagues to thank our cooperation; Simon Shields, Andrew Hendry, and Ray Walford.
Vishal I would like to thank Glen McCallum to completing the help, encouragement and support from this tutorial process.
Introduction.
Read the preparation of this tutorial.
Before you start reading this tutorial, you should have a certain understanding of Java, XML, J2EE, and Some Exposure to SQL, JDBC concept, and xdoclets. Even if you are more strange to the techniques mentioned above Don't be tight - That is just a multidemption time when you study! All the examples involved in the REDHAT Linux 8.0 platform with Sun Microsystem's JDK (J2SDK1.4.1_02) use Eclipse 2.1 as IDE, and Lomboz 2.1_02 Developed as an Eclipse plug-in. JBoss-3.2.1 is used as an application server to deploy applications. Jetty is a network server, Hypersonic SQL as a database, both of which are integrated in JBOSS.
Tools used in this tutorial.
You will need a certain version of the Java Development Pack (JDK) or Java runtime environment (JRE) - at least JDK 1.3 or more. Eclipse 2.1 is required as an integrated development environment (IDE) and the plugin Lomboz 2.1_02 of Eclipse and integrate JBoss.
JBoss-3.2.1 As an application server to deploy an application, use the embedd Jetty web server and the Hypersonic SQL database mentioned above.
Preview of case learning.
In this tutorial, we use a case similar to a warehouse, rather than using other complex scenes or using strict database design, because our goal is to learn how to use the new generation of attribute methods and these tools to design and Develop different J2EE components.
We have a database model called 'MyStore', which consists of 5 tables.
Table Supplier recorded information that recorded suppliers, they received different raw materials to MyStore after receiving the needs from MyStore managers.
Table Manager is used to record the information of managers who operate MyStore, and now there is only one manager.
Table Customer is used to record the information of customers who have bought a thing at MyStore.
Table Items is used to record products in the warehouse.
Table StoreAccess Records all online use of MyStore customers, suppliers, and managers' authentication information.
The MyStore database is shown below.
In order to read data from the database, we will create a large number of J2EE components including session, entity (Entity), EJB component network client, servlets and JSPs used by the EJB component network client.
The figure below is an overview of the MyStore application architecture.
Note: In the case of using the network client, a request is passed using RMI with RMI through servlets / JSP (Java Server Pages) to access data from the database from the database with the RMI. State-in, state, and bean managed persistence (BMP) entity Beans use DAO. DAO is the package of JDBC code, and the implementation of the container management permanent (CMP) entity Beans does not require DAO, because this container manages communication between the Beans database, this is a powerful feature. Finally, the Java client request is passed Java Middleware Technology (RMI, CORBA, Java Messaging) is transmitted to entity beans.
All Beans and their public methods implemented in the tutorial are listed in the figure below. StoreAccessBean is a session facade (Façade, detailed design mode) beans, complex customers, managers, commodity entries And supplier entities Beans While providing the business logic, it provides its interface to the representation layer.
MyStore customers, suppliers and managers use the StoreAccess stateless session bean to log in to this system. Once authenticated, they will use the different available interfaces in the StoreAccess Bean to send out information such as MyStore warehouse, managers information, customer information and supplier information. request. RequestItems and DeliverItems are message-driven Beans that monitors messages from JMS Producers and passing them to other Beans. Now let's get started, learn how to install development environments in Chapter 1.
Welcome to the original place for retain http://raxy.blogbus.com!