Hi,
I used spring old style configuration for my JNDI lookup:
<bean id="jndi" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<util:properties location="classpath:spring/jndi.properties" />
</property>
</bean>
<bean id="tut" class="org.springframework.jndi.JndiObjectFactoryB ean">
<property name="jndiTemplate" ref="jndi" />
<property name="jndiName" value="ShoppingCartBean/remote" />
</bean>
In my app, I may have several jndi.properties. I do not want to repeat every time the properties in the bean defintion. That's why I use a ref on JndiTemplate.
I try to use spring 2.0 style with jee schema. Unfortuantely I do not find a solution. To specify the environment I need to duplicate the env.
<jee:jndi-lookup id="tut4" jndi-name="ShoppingCartBean/remote"/>
<jee:environment>
java.naming.provider.ur=localhost:1099
<jee:environment>
</jee:jndi-lookup>
Is it possible to add a ref to specify only once the jee;environment ? Is there another solution ?


Reply With Quote
roperties location="classpath:spring/jndi.properties" />