HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML

"Using Notification Servers in J2EE Applications"
Vol. 7, Issue 8, p. 18


Listing 1

// Set your mail server properties here
Properties props=new Properties();

// Get a JavaMail session using the mail server
Session session = 
Session.getDefaultInstance(props, null);

// Create the message
Message message = new MimeMessage(session);

// Fill the message
message.setSubject("Claim Assigned");
new InternetAddress("[email protected]"));
new InternetAddress("[email protected]"));

String content = "<H1> Please inspect the car and
submit incident report 024199 <H1>";

message.setContent( content,"text/html");

  // Send the message

Listing 2

  <recipient domain="cysive.com">jdoe</recipient>
  <message>Claim Assigned to you</message>
  <reference name="RedDot Insurance Inc."/>
  <description>Claim Assigned</description>


    <value>Please determine repair costs</value>
     <name>Claim #</name>

Listing 3

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
<xsl:output method="text" version="1.0"
encoding="UTF-8" indent="yes"/>
  <xsl:template match="/">
    <xsl:for-each select="event">
      <xsl:value-of select="message"/>


All Rights Reserved
Copyright ©  2004 SYS-CON Media, Inc.
  E-mail: [email protected]

Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.