TERASOLUNAプロジェクトからデータベースに接続する
手順
chameleon-env.xmlの編集
chameleon-env.xmlに、WildFly上に定義したJDBCデータソースのJNDI名を指定する。
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xsi:schemaLocation=" http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd "> <!-- omitted. --> <!-- <bean id="dataSource" class="net.sf.log4jdbc.Log4jdbcProxyDataSource"> <constructor-arg index="0" ref="realDataSource" /> </bean> --> <!-- omitted. --> <jee:jndi-lookup id="dataSource" jndi-name="java:/jdbc/ChameleonDS" /> <!-- omitted. --> </beans>