Just another blog.

Difference between jee:jndi-lookup and JndiObjectFactoryBean?

Java

I found slight difference between usage of <jee:jndi-lookup and definition of beans using JndiObjectFactoryBean.

Following configuration works well on local Jetty, but doesn’t work deployed on WebLogic server.

<jee:jndi-lookup id="connectionFactory" jndi-name="jms-cf"></jee:jndi-lookup>
<jee:jndi-lookup id="replyQueue" jndi-name="jms-queue0"></jee:jndi-lookup>
<jee:jndi-lookup id="requestQueue" jndi-name="jms-queue1"></jee:jndi-lookup>

But with this configuration, everything is fine.

<bean id="connectionFactory">
  <property name="jndiName" value="jms-cf"></property>
</bean>

<bean id="replyQueue">
  <property name="jndiName" value="jms-queue0"></property>
</bean>
<bean id="requestQueue">
  <property name="jndiName" value="jms-queue1"></property>
</bean>

Little bit strange :-)

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>