This class provides an implementation of the javaMail service.
author: Florent Benoit author: Ludovic Bert author: Contributor(s): author: Adriana Danes : author: - Make possible to change configuration of a JOnAS mail factory object. author: - Make possible to change the JNDI name of a JOnAS mail factory object.
renameJavaMailFactory(String oldName, JavaMail factory) This method is used when a particular Mail Factory configuration operation is done via jonasAdmin :
when the JNDI name of this resource is modified.
public void
unbindMailFactories() Unregister all the binding factories on the server and in JMX Server.
Create a mail factory with the specified properties and register it
into the registry.
Parameters: factoryName - name of the factory to create Parameters: props - the properties used to configure the mail factory. throws: MailServiceException - if the creation or the registration ofthe factory failed.
Create a mail factory with the specified properties and register it
into the registry.
Parameters: name - the mail factory name Parameters: props - the properties used to configure the mail factory. Parameters: loadFromFile - true if the mail factory is loaded from a .properties file throws: MailServiceException - if the creation or the registration ofthe factory failed. throws: MailServiceException -
Gets the factory name given the jndi name. Null is returned if the given name is not binded.
Parameters: jndiName - the jndi name the factory name given the jndi name. Null is returned if the given name is not binded.
Gets the mail factory configuration properties from a local file
Parameters: configFile - configuration to use mail factory configuration properties from a local file throws: Exception - if it fails
This method is used when a Mail Factory configuration is modified via jonasAdmin.
In this case, the updated JavaMail object (JavaMailSession or JavaMailMimePartDS object)
must be rebound in JNDI
Parameters: factory - the factory throws: MailServiceException - if the recreation ofthe factory failed.
This method is used when a particular Mail Factory configuration operation is done via jonasAdmin :
when the JNDI name of this resource is modified.
In this case, the initial JavaMail object (JavaMailSession or JavaMailMimePartDS object) must be unbound
and the updated JavaMail object must be reloaded.
Also, the Mail Service private data structures must be updated.
Parameters: oldName - old name of the factory Parameters: factory - the new factory throws: MailServiceException - if the rename of thethe factory failed.
Unregister the factory with the given name.
Parameters: factoryName - the name of the factory to unbind. throws: MailServiceException - if the unregistration of the factoryfailed.
Methods inherited from org.objectweb.jonas.service.AbsServiceImpl