[jboss-user] [Spring Integration] New message: "Mail session through JNDI"

Markus Reich do-not-reply at jboss.com
Sat Jan 30 16:36:31 EST 2010

User development,

A new message was posted in the thread "Mail session through JNDI":


Author  : Markus Reich
Profile : http://community.jboss.org/people/Meex

Hi community,
I have following constellation:
JBOSS 4.2.2 (contains EJB Beans containing the business logic
Tomcat 6 running the GUI
Now I want to use the mail session provided by JBOSS in my Tomcat deployed app, I thought I can use the Spring JNDI Template therefore:
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
 <property name="environment">
 <prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
 <prop key="java.naming.provider.url"></prop>
 <prop key="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</prop>
 <bean id="mailSession" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
 <property name="jndiTemplate" ref="jndiTemplate" />
 <property name="jndiName" value="java:/Mail" />
But using this leads to following error?
Caused by: javax.naming.NameNotFoundException: Mail not bound
 at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
 at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
 at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
 at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
Maybe I misunderstood sthg. or am I doing something wrong, when I look into the JMX console I see the java:/Mail service running?


To reply to this message visit the message page: http://community.jboss.org/message/523148#523148

More information about the jboss-user mailing list