Use jndi to configure mail session

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@479679 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Emmanuel Venisse 2006-11-27 16:24:08 +00:00
parent 759360c0c2
commit 9592d5b4ae
2 changed files with 28 additions and 0 deletions

View File

@ -29,6 +29,26 @@
<role-hint>dataSources</role-hint> <role-hint>dataSources</role-hint>
<configuration> <configuration>
<resources> <resources>
<!------------------>
<!-- Mail Session -->
<!------------------>
<resource>
<name>mail/Session</name>
<type>javax.mail.Session</type>
<properties>
<property>
<name>mail.smtp.host</name>
<value>localhost</value>
</property>
<property>
<name>mail.smtp.port</name>
<value>25</value>
</property>
</properties>
</resource>
<!------------------>
<!-- Datasources -->
<!------------------>
<resource> <resource>
<name>jdbc/users</name> <name>jdbc/users</name>
<type>javax.sql.DataSource</type> <type>javax.sql.DataSource</type>

View File

@ -30,6 +30,14 @@
</configuration> </configuration>
</component> </component>
<component>
<role>org.codehaus.plexus.mailsender.MailSender</role>
<implementation>org.codehaus.plexus.mailsender.javamail.JndiJavamailMailSender</implementation>
<configuration>
<jndiSessionName>java:comp/env/mail/Session</jndiSessionName>
</configuration>
</component>
<!-- <!--
| Logger manager | Logger manager
--> -->