Beginning POJOs. From Novice to Professional. Brian Sam-Bodden



Similar documents
OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

This training is targeted at System Administrators and developers wanting to understand more about administering a WebLogic instance.

Enterprise Application Development In Java with AJAX and ORM

Rapid Application Development. and Application Generation Tools. Walter Knesel

JAVA/J2EE DEVELOPER RESUME

OptimalJ Foundation. PSM EJB Model. Roadmap. What is the EJB model? EJB model as a PSM model Mapping the EJB model Model elements and code generation

Software infrastructure for Java development projects

Java Power Tools. John Ferguson Smart. ULB Darmstadt 1 PI. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo

Architecture Rules Enforcement and Governance Using Aspects

Mastering Tomcat Development

Portals, Portlets & Liferay Platform

How To Write A Web Framework In Java

Java Software Quality Tools and techniques

Core Java+ J2EE+Struts+Hibernate+Spring

JAVA ENTERPRISE IN A NUTSHELL. Jim Farley and William Crawford. O'REILLY 4 Beijing Cambridge Farnham Koln Paris Sebastopol Taipei Tokyo.

Build management & Continuous integration. with Maven & Hudson

Programma corso di formazione J2EE

SSC - Web development Model-View-Controller for Java web application development

SAP NetWeaver Opens SAP ERP world. Amedeo Prodi SAP Italia

Java Web Programming with Eclipse

Application Notes for Packaging and Deploying Avaya Communications Process Manager Sample SDK Web Application on a JBoss Application Server Issue 1.

Java EE 7: Back-End Server Application Development

CrownPeak Java Web Hosting. Version 0.20

JBS-102: Jboss Application Server Administration. Course Length: 4 days

GLOBAL CONSULTING SERVICES TOOLS FOR WEBMETHODS Software AG. All rights reserved. For internal use only

Java Platform, Enterprise Edition (Java EE) From Yes-M Systems LLC Length: Approx 3 weeks/30 hours Audience: Students with experience in Java SE

Java (J2SE & J2EE) and Web Development Training Catalog

Software Development Interactief Centrum voor gerichte Training en Studie Edisonweg 14c, 1821 BN Alkmaar T:

Windows 2000 / NT 4.0 / 95 / 98, MS-DOS, Suse Operating Systems

Course Name: Course in JSP Course Code: P5

Extend WTP Server Tools for your application server. Tim deboer Gorkem Ercan

WebSphere Training Outline

ORM IN WEB PROGRAMMING. Course project report for 6WW Erik Wang

CloudCERT (Testbed framework to exercise critical infrastructure protection)

Java/J2EE or Web Developer. Formal Education. Technical knowledge. Spoken Languages

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

Building Web Services with Apache Axis2

Expert Spring MVC and Web Flow

Converting Java EE Applications into OSGi Applications

Stock Trader System. Architecture Description

APAC WebLogic Suite Workshop Oracle Parcel Service Overview. Jeffrey West Application Grid Product Management

Oracle Application Development Framework Overview

Web and Enterprise Applications Developer Track

Oracle WebLogic Server 11g: Administration Essentials

OXAGILE RESUMES SUMMARY OF QUALIFICATIONS TECHNICAL SKILLS SENIOR JAVA SOFTWARE ENGINEER

Introduction to Sun ONE Application Server 7

Coding in Industry. David Berry Director of Engineering Qualcomm Cambridge Ltd

WebSphere Server Administration Course

OpenShift is FanPaaStic For Java EE. By Shekhar Gulati Promo Code JUDCON.IN

WEB APPLICATION DEVELOPMENT. UNIT I J2EE Platform 9

Continuous Integration Multi-Stage Builds for Quality Assurance

Agile Best Practices and Patterns for Success on an Agile Software development project.

HPC PORTAL DEVELOPMENT PLATFORM

Case Studies of Running the Platform. NetBeans UML Servlet JSP GlassFish EJB

Nicholas S. Williams. wrox. A Wiley Brand

2012 LABVANTAGE Solutions, Inc. All Rights Reserved.

Grails: Accelerating J2EE Application Development

Research Article. ISSN (Print) *Corresponding author Lili Wang

PL/SQL. JSP Java Script. Struts JSF EJB 2.1. Hibernate. JBoss RichFaces EJB 3

the first thing that comes to mind when you think about unit testing? If you re a Java developer, it s probably JUnit, since the

HPC Portal Development Platform with E-Business and HPC Portlets

This document gives an outline of Tim Ward s work on mobile phone systems

Enterprise JavaBeans 3.1

Client-Server Architecture & J2EE Platform Technologies Overview Ahmed K. Ezzat

JBoss SOAP Web Services User Guide. Version: M5

Building Web Applications, Servlets, JSP and JDBC

A Comparison of Open Source Application Development Frameworks for the Enterprise

IBM WebSphere Server Administration

JBoss JEE5 with EJB3.0 on NonStop. JAVA SIG, San Jose

SOA REFERENCE ARCHITECTURE: WEB TIER

Introduction to Apache Roller. Matt Raible Apache Roller Committer June 2007

Jenkins User Conference Herzelia, July #jenkinsconf. Testing a Large Support Matrix Using Jenkins. Amir Kibbar HP

Curriculum Vitae 12/12/12

Contents 1 Overview 2 Introduction to WLS Management Services iii

Japan Communication India Skill Development Center

Android Programming: Installation, Setup, and Getting Started

ActiveVOS Server Architecture. March 2009

JEE Web Applications Jeff Zhuk

Java 7 Recipes. Freddy Guime. vk» (,\['«** g!p#« Carl Dea. Josh Juneau. John O'Conner

Course Description. Course Audience. Course Outline. Course Page - Page 1 of 5

WebLogic Server 11g Administration Handbook

5 Days Course on Oracle WebLogic Server 11g: Administration Essentials

What means extensibility?

Developing modular Java applications

ASP.NET MVC. in Action JEFFREY PALERMO JIMMY BOGARD BEN SCHEIRMAN MANNING. (74 w. long.) WITH MVCCONTRIB, N HIBERNATE, AND MORE.

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

Enterprise Applications

How To Develop An Application Developer For An Ubio Websphere Studio 5.1.1

Running and Testing Java EE Applications in Embedded Mode with JupEEter Framework

Creating Web Services Applications with IntelliJ IDEA

The Spring Framework: An Open Source Java Platform for Developing Robust Java Applications

Point-of-Sale Developer Guide

Transcription:

Beginning POJOs From Novice to Professional Brian Sam-Bodden

Contents About the Author Acknowledgments Introduction.XIII xv XVII CHAPTER1 Introduction The Java EE Market Case Study: The TechConf Website... Defining the Stakeholders The Business Problem General Application Requirements. Attendees Presenters 6 Sponsors 7 Administrators 7 Architectural Requirements 8 Open Issues and Assumptions 10 Assumptions 1 0 Open Issues u Design Road Map ^ Finding and Refining Candidate Domain Model Elements 13 Use Case Modeling 16 Modeling Best Practices 18 The Open Source Tools 1 8 Useful Open Source Resources 19 Summary 20 CHAPTER 2 Eclipse Installing Eclipse 24 Using Eclipse 25 23 vii

CONTENTS Creating an Eclipse Project 26 Creating a Java Interface 29 Creating a Java Class 32 Running a Java Class 34 Debugging a Java Class 35 Eclipse Plug-ins 36 Concurrent Versions System 37 Understanding CVS 37 CVS Concepts 37 CVS in Eclipse 38 Database Plug-ins 40 SQL Explorer 40 Web Development Plug-ins 46 Summary 46 SCHAPTER 3 Building with Ant 47 Introduction to Ant 48 Obtaining and Installing Ant 50 Ant's Command-Line Options 51 A Simple Ant Example 52 More on Targets 57 Target Dependencies 58 Tasks 61 Properties 61 Datatypes 63 Case Study: Building TechConf with Ant 65 Compiling 68 Buildfile Reuse with Macros 69 Javadoc Generation 71 Checking Code Conventions with Checkstyle 73 Generating Source-Code Metrics 75 Generating Browsable Source Code 77 Document Generation 79 Cleaning Up 80 The All Target 81 Eclipse Integration 81 Summary 85

CO CHAPTER 4 Object Relational Mapping with Hibernate 87 Introduction to Hibernate 89 How Hibernate Works 91 The Process 95 POJO-Driven Approach 95 Data Model-Driven Approach 96 HBM-Driven Approach 97 The Tools 98 Road Map 99 Hibernate in J2SE 99 Obtaining Hibernate 100 Setup for POJO Development 100 Eclipse Setup 101 Database Setup 102 Quick Start 102 POJO Sample Code. 102 Mapping (HBM) File 104 Creating the Table 105 Primary Key Generation 106 Saving an Object 108 Retrieving a Single Object 112 Retrieving a Collection of Objects 114 Case Study: Mapping the TechConf Domain Model 118 Conferences Home Page 118 One-to-Many Mapping Using a Set 121 Testing Conference and Tracks 124 Many-to-One: Conferences and Venues 129 Inheritance 129 Inheritance: Table-Per-Class Hierarchy 130 Inheritance: Table Per Subclass 141 Summary 143 CHAPTER 5 Business Services with JBoss 145 JBOSS 146 JBOSS JEMS 147 JBoss AS Architecture 147 Installing and Configuring JBoss 149 Service Objects 154 Stateless Session Beans 155

X «CONTENTS Roads to Persistence 157 Hibernate in JBoss 157 Implementing the DAO Pattern with Hibernate 161 Implementing DTO Pattern with DynaDTO 169 Background 169 DynaDTO 170 DynaDTO in a JSE Environment 176 DynaDTO in JBoss 177 Implementing Service Layer for TechConf 180 Message-Driven POJOs 189 Summary 194 CHAPTER 6 The Spring Framework 195 Coding to Interfaces 195 Dependency Injection 196 Aspect Oriented Programming 198 Full-featured Application Framework 198 Installing and Configuring Spring 200 Working with Spring Bean Factories 200 A Simple Spring Web Application 204 Spring's Starter Web Application 204 JAR Dependencies 205 Java Code 205 Configuring the Spring Application Context 206 JSP Test Page 207 Deployment Descriptors and Build Configuration 207 Deploying to Tomcat 209 Business Services with Spring 210 Spring and Hibernate 211 Implementing the DAO Pattern with Spring 213 Implementing DTO Pattern with DynaDTO 218 Implementing Service Layer for TechConf 219 Sending Email 223 Spring MVC 225 Creating an MVC Controller 225 Creating a JSP View 227 Using Tiles 227 Configuring the Web Deployment 229 Mapping URLs to Controllers 231 Page Navigation and Parameter Passing 232 Summary 237

CONTENTS xi CHAPTER 7 Tapestry 239 What Is Tapestry? 241 Tapestry 4 Features 241 Downloading and Configuring Tapestry 242 Your First Tapestry Application 243 Configuring Tapestry 243 HTML Page 244 The Java Code 245 Page XML Descriptor 246 Web Deployment Descriptor 247 Building and Running the Example 249 The Big Picture 251 The Power of Components 252 Simplifying the Simple Example 254 User Input 255 Building the TechConf Ul with Tapestry 261 Building the Home Page 262 HiveMind Services 265 Testing the Home Page 268 Creating a Border Component 269 Conference Summary Page 282 AJAX with Tacos 288 The AJAX-powered Attendee Registration Page 292 Summary 303 CHAPTER 8 Testing 305 Unit Test or Functional Test? 305 Testing in the Development Cycle 306 Testing Best Practices 307 Tools 308 JUnit.' 309 TestNG 312 Groups 315 Dependent Methods 319 Parameters 319 TestNG Eclipse Plug-in 320 TestNG Reports.322 TestNG and Ant 322

xii CONTENTS Testing Against the Database 324 DbUnit 332 Testing the DTO Layer 337 Testing EJB3 Stateless Session Beans 339 Summary 343 CHAPTER g Continuous Integration 345 Cruise Control 347 Configuring the Build Server 348 CruiseControl Working Directory 348 Setting Up a Project for Continuous Integration 351 Notification Mechanisms 356 TechConf on CruiseControl 358 Metrics 360 Summary 361 CHAPTER 10 Additional Topics 363 AOP with AspectJ 363 Obtaining and Installing AspectJ 364 AspectJ and Ant 365 Logging and Tracing with AspectJ 367 AJDT 372 Translating Exceptions 373 Other Applications of AOP 375 RSS with Informa 376 Summary 379 INDEX 381