Giriş
JNDI nesnesini Spring Bean haline getirir.
Kullanım
Şöyle yaparız
<bean id="dbServiceBean" class="org.springframework.jndi.JndiObjectFactoryBean"><property name="jndiName" value="#{T(com.foo.DbAccessUtils).DB_SERVICE_BEAN_JNDI}" /><property name="proxyInterface" value="com.foo.IDbServiceLocal" /></bean>
setLookupOnStartup metodu
Örnek
Örnek
Lazy init için XML ile şöyle yaparız.
<jee:jndi-lookup id="datasource" jndi-name="java:/comp/env/jdbc/Tomcat8Database"
destroy-method="close" expected-type="javax.sql.DataSource" lookup-on-startup="false"
proxy-interface="javax.sql.DataSource"/>