tyrex.resource.javamail
Class JavaMailConfig
java.lang.Object
tyrex.resource.ResourceConfig
tyrex.resource.javamail.JavaMailConfig
- public class JavaMailConfig
- extends ResourceConfig
Extends ResourceConfig to load the JavaMail Resource
configuration.
See the Castor Mapping file (mapping.xml) found in
package tyrex.tm.impl.
An example configuration is given below:
MyMail
mail.smtp.host
mail.exolab.org
- Version:
- $Revision: 1.1 $
- Author:
- Ashish Agrawal
Method Summary |
void |
addProperty(Property aProperty)
Called by Castor and defined in the mapping file to
add each specific property associated with the Session. |
java.lang.Object |
createFactory()
Called to create a new factory object for the purpose of
configuring it. |
Resource |
createResource(TransactionDomain txDomain)
Called to create a new resource from this resource configuration. |
java.util.Enumeration |
getProperties()
|
Methods inherited from class tyrex.resource.ResourceConfig |
getFactory, getJAR, getLimits, getName, getPaths, getTwoPhase, getURL, setFactory, setJAR, setLimits, setName, setPaths, setTwoPhase |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_properties
public java.util.Properties _properties
JavaMailConfig
public JavaMailConfig()
addProperty
public void addProperty(Property aProperty)
- Called by Castor and defined in the mapping file to
add each specific property associated with the Session.
See the JavaMail documentation for the specific keys
and their values.
getProperties
public java.util.Enumeration getProperties()
createFactory
public java.lang.Object createFactory()
throws ResourceException
- Called to create a new factory object for the purpose of
configuring it. This method will return a factory object that
will be configured from the resource configuration file, before
being added to this object with a subsequent call to
setFactory
.
- Specified by:
createFactory
in class ResourceConfig
- Returns:
- The factory object (never null)
- Throws:
ResourceException
- An error occured while attempting
to create a new factory
createResource
public Resource createResource(TransactionDomain txDomain)
throws ResourceException
- Called to create a new resource from this resource configuration.
- Specified by:
createResource
in class ResourceConfig
- Parameters:
txDomain
- The transaction domain in which the resource will
be used
- Returns:
- The resource
- Throws:
ResourceException
- An error occured while attempting to
create the resource
Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.