Config in Spring a DataSource for WeblogicServer





3
Date Submitted Sun. Jul. 15th, 2007 2:52 PM
Revision 1 of 1
Helper rugi
Tags Config | datasource | Spring | WebLogicServer
Comments 0 comments
Config in Spring a DataSource for WeblogicServe

<!--first: the template-->
        <bean id="DSJNDITemplate" class="org.springframework.jndi.JndiTemplate">
            <property name="environment">
                <props>
                    <prop key="java.naming.provider.url">
                        t3://localhost:7001
                    </prop>
                    <prop key="java.naming.factory.initial">
                        weblogic.jndi.WLInitialContextFactory
                    </prop>
                </props>
            </property>
        </bean>

<!--and: the dataSource-->
        <bean id="dataSourceJNDI" class="org.springframework.jndi.JndiObjectFactoryBean">
                <description>Main dataSource for app</description>
          <property name="jndiName">
                <value>services/MySQL_DS</value>
          </property>
          <property name="resourceRef">
              <value>false</value>
          </property>
          <property name="jndiTemplate">
              <ref local="DSJNDITemplate" />             
          </property>
        </bean>
 

Isaac Ruiz Guerra

www.kappa-8.com/
"non nobis domine"

Comments

There are currently no comments for this snippet.

Voting

Votes Down