Creating a MessagingEJBClient Instance Using a Programmatic or Declarative Approach API Reference for Class MessagingClientFactory

17-8 Developers Guide Of the two application modules choices described in Section 17.1.1, Creating a J2EE Application Module , this sample focuses on the Web Application Module WAR, which defines some HTML forms and servlets. You can examine the code and corresponding XML files for the Web App module from the provided usermessagingsample-src.zip source. The servlets uses the UMS EJB Client API to create an UMS EJB Client instance which in turn registers the applications info and sends messages. This application, which is packaged as a Enterprise ARchive file EAR called usermessagingsample.ear, has the following structure: ■ usermessagingsample.ear ■ META-INF – application.xml -- Descriptor file for all of the application modules. – weblogic-application.xml -- Descriptor file that contains the import of the oracle.sdp.messaging shared library. ■ usermessagingclient-ejb.jar -- Contains the Message EJB Client deployment descriptors. META-INF – ejb-jar.xml – weblogic-ejb-jar.xml ■ usermessagingsample-web.ear -- Contains the Web-based front-end and servlets. WEB-INF – web.xml – weblogic.xml The pre-built sample application, and the source code usermessagingsample-src.zip are available on OTN.

17.5.1 Overview of Development

The following steps describe the process of building an application capable of outbound messaging using usermessagingsample.ear as an example: 1. Section 17.5.2, Configuring the E-Mail Driver 2. Section 17.5.3, Using JDeveloper 11g to Build the Application 3. Section 17.5.4, Deploying the Application 4. Section 17.5.5, Testing the Application

17.5.2 Configuring the E-Mail Driver

To enable the Oracle User Messaging Service’s E-Mail Driver to perform outbound messaging and status retrieval, configure the E-Mail Driver as follows: ■ Enter the name of the SMTP mail server as the value for the OutgoingMailServer property. Note: This sample application is generic and can support outbound messaging through other channels when the appropriate messaging drivers are deployed and configured.