W R I T E   A N D   D E P L O Y   J 2 E E   A P P L I C A T I O N S  
Chapter  
6 
6. Write and Deploy J2EE Applications 
How to write and deploy EJB and Web applications 
This chapter gives you an introduction on how to write J2EE applications for JBoss but does 
not discuss how to write EJBs, Servlets or JSPs etc. in general. There are some good books 
available explaining how to write EJBs and Web applications. Because the Template project 
from chapter 3 is used here the code snippets are mostly from XDoclet generated files and 
you will find these files in the  build  directory of the Template project. 
EJBs and Web components like Servlets, JSPs etc. are the heart of the server side J2EE 
application. They have all in common to reside in their container that is part of the J2EE 
application server. For convenience sake they can be deployed as Java archives with 
different extensions. These achieves contain a vendor neutral deployment descriptor (or DD 
for short), 0 to n vendor specific DDs, other archives if available, compiled Java classes, 
JSPs, HTML Pages and other resource files. In JBoss they can be hot deployed with a drop 
in the deployment archive and replaces any existing applications with the same name. 
Entity Beans 
Entity Beans represent unit of data that is in a relational database a record. It encapsulates 
the database specifics as well as the integration into transactions and the timing when the 
data is synchronized with the persistence store. 
As a rule of thumb Entity Beans should not contain any business logic but only data 
integrity and persistence logic. 
Bean Managed Persistence (BMP) 
Bean Managed Persistence means that the Bean Developer coded the logic how the data is 
made persistent on the target persistence store like a RDBMS. This also means that most 
likely the EJB is specific for a certain persistence store even thought the application is 
written vendor neutral. 
The code how to store or retrieve data from the persistence store are added to the ejbStore() 
and ejbLoad() methods. It is the client's responsibility to retrieve the correct resource 
44






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

best web hosting

 

Our partners: PHP: Hypertext Preprocessor Cheap Web Hosting JSP Web Hosting Ontario Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Java Hosting Cheapest Hosting

Visionwebhosting.net Business web hosting division of Vision Web Hosting Inc.. All rights reserved