[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":

http://community.jboss.org/message/523148#523148

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

Message:
--------------------------------------------------------------
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">
 <props>
 <prop key="java.naming.factory.initial">org.jnp.interfaces.NamingContextFactory</prop>
 <prop key="java.naming.provider.url">172.20.36.106</prop>
 <prop key="java.naming.factory.url.pkgs">org.jboss.naming:org.jnp.interfaces</prop>
 </props>
 </property>
 </bean>
 
 <bean id="mailSession" class="org.springframework.jndi.JndiObjectFactoryBean" lazy-init="true">
 <property name="jndiTemplate" ref="jndiTemplate" />
 <property name="jndiName" value="java:/Mail" />
 </bean>
 
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?
 
regards
Meex

--------------------------------------------------------------

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




More information about the jboss-user mailing list