[Spring] 스프링 jndiName 매핑

2010. 6. 1. 13:06FrameWork/Spring

 @ jndiName 설정

 

<!-- PORTAL SOURCE -->
 <bean id="OracleTest" class="org.springframework.jndi.JndiObjectFactoryBean">
   <property name="jndiName" value="OracleTest" />
   <property name="resourceRef" value="true" />
   </bean>

 

<property name="resourceRef" value="true" /> 경우 톰캣용  lookup("java:/comp/env");

<property name="resourceRef" value="false" /> 경우 웹로직용  lookup("/comp/env");


   

org.springframework.jndi.JndiObjectFactoryBean OracleTest = new org.springframework.jndi.JndiObjectFactoryBean()
   OracleTest.setJndiName("OracleTest");