-D
--- On Fri, 8/5/11, christian.kersters <christian...@swing.be> wrote:
I have tested successfully the mail session with JBoss 5.1.0 GA, and I
suppose that it works also with JBoss 4.x.
I have configured the following (using javamelody 1.30):
- First, configure the mail session in JBoss. In
deploy/mail-service.xml, I have :
<attribute name="JNDIName">java:/Mail</attribute>
...
- Inside the webapp, add the file "WEB-INF/jboss-web.xml":
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<!-- warning: I am not sure that this file is deployed when using
Eclipse WTP -->
<resource-ref>
<res-ref-name>Mail</res-ref-name>
<jndi-name>java:/Mail</jndi-name>
<res-type>javax.mail.Session</res-type>
</resource-ref>
</jboss-web>
- I have not found a Tomcat context.xml in JBoss. But the javamelody
mail parameters can be added in the web.xml file or with system properties.
Inside the webapp, add the following in "WEB-INF/web.xml" in the
javamelody filter declaration :
<init-param>
<param-name>admin-emails</param-name>
<param-value>eve...@free.fr</param-value>
</init-param>
<init-param>
<param-name>mail-session</param-name>
<param-value>Mail</param-value>
</init-param>
And I have made a patch, which is attached to this mail and which I will
commit soon for the next release (javamelody 1.31).
With this patch, it will work the same as above, except that there will
be no need to add the jboss-web.xml file.
Let me know if it works for you.
bye,
Emeric
Le 05/08/2011 14:21, Darren Hartford a �crit :
<init-param>
<param-name>mail-periods</param-name>
<param-value>day,week,month</param-value>
</init-param>
Emeric