Before you start
This tutorial series is for J2EE and Java Platform, Enterprise Edition (Java EE) programmers who would like to learn how to build integrated solutions using various J2EE components like MDBs, JCA resource adapters, and so on.
This three-part series walks you through building a sample application to understand how different J2EE components can be integrated to develop complex applications. The sample application demonstrates the flow of data from an e-mail in the Apache James e-mail server to the Apache Geronimo application server via a JCA resource adapter, MDBs, and EJB.
Part 1 demonstrated how to develop MDBs and entity beans, and container-managed persistence (CMP) and how to deploy and test these components in Apache Geronimo.
Part 2 explained how to create an e-mail application (mailers and matchers) and deploy it in Apache James.
Part 3 ties the entire application together. You'll learn how to develop, deploy, and test a JCA resource adapter for Apache James that interacts with both James and Geronimo via MDB.
This final tutorial in the three-part series explains in detail the interactions between different J2EE components (MDB and JCA adapters). You'll learn about JCA-based resource adapters and build a sample adapter that connects to the Apache James server.
This tutorial assumes you're familiar with basic Java, J2EE, and Java EE concepts, such as Enterprise Java Beans (EJB), Java Message Service (JMS), MDBs, and Unified Modeling Language (UML) diagrams. You're not required to have any prior knowledge of JCA. However, if you would like to read the JCA specification before starting this tutorial, check the Resources section for a link.
You need the following tools to follow along with this tutorial:
- Apache Geronimo -- Java EE application server from Apache
- Apache James 2.2 -- Java-based Simple Mail Transfer Protocol (SMTP), Post Office Protocol version 3 (POP3), and Network News Transfer Protocol (NNTP) news server
- The Apache Derby database -- Open source, lightweight database that is embedded within Geronimo, so no separate installations are required
- Java 1.4.2 from Sun Microsystems
First, download part3.zip (available in the Download section), which includes source, adapter, MDB, and EJB binaries for Part 3. The components of part3.zip include the following:
- - deploy (po.ear, which contains both the mailet and matcher)
- - lib (tester.jar, examples.jar, mail-1.3.1.jar, activation.jar)
- - src (Java files for resource adapter, mdb, ejb and test client)
- - runSendEmail.cmd
- - runReadEmail.cmd

