tyrex.resource.javamail

Class 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

Field Summary
Properties_properties
Method Summary
voidaddProperty(Property aProperty)
Called by Castor and defined in the mapping file to add each specific property associated with the Session.
ObjectcreateFactory()
Called to create a new factory object for the purpose of configuring it.
ResourcecreateResource(TransactionDomain txDomain)
Called to create a new resource from this resource configuration.
EnumerationgetProperties()

Field Detail

_properties

public Properties _properties

Method Detail

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.

createFactory

public Object createFactory()
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.

Returns: The factory object (never null)

Throws: ResourceException An error occured while attempting to create a new factory

createResource

public Resource createResource(TransactionDomain txDomain)
Called to create a new resource from this resource configuration.

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

getProperties

public Enumeration getProperties()
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.