Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

Have your application call my application, Part 3: The resource adapter

Geronimo message-driven beans, JCA resource adapters, and e-mail

Madhuri Suda (madhuri_suda@yahoo.com), Java programmer, Freelance
Madhuri Suda graduated with a master's degree in computer science from Illinois Institute of Technology in 2002. She has been working as a Java/Java EE programmer since 1999.

Summary:  In Part 1 and Part 2 of this three-part tutorial series, you learned how to develop message-driven beans (MDBs) and entity beans and deploy and test them in Apache Geronimo and how to create an e-mail application and deploy it in Java™ Apache Mail Enterprise Server (Apache James). In this final installment, you'll tie the application together by learning all about Java 2 Platform, Enterprise Edition (J2EE) Connector Architecture (JCA) resource adapters and building a sample adapter that connects to the Apache James server.

View more content in this series

Date:  05 Sep 2006
Level:  Intermediate PDF:  A4 and Letter (650 KB | 41 pages)Get Adobe® Reader®

Activity:  7372 views
Comments:  

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.

About this series

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.


About this tutorial

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.


Prerequisites

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.


System requirements

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

Example source file

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

1 of 12 | Next

Comments



Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Open source, Java technology
ArticleID=157320
TutorialTitle=Have your application call my application, Part 3: The resource adapter
publish-date=09052006
author1-email=madhuri_suda@yahoo.com
author1-email-cc=troy@backstopmedia.com

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere).

My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).

Try IBM PureSystems. No charge.