2014년 5월 21일 수요일
JBoss EAP 6.0 (jBoss Application Server 7.0)에서 오라클 DataSource 설정하기
** 참고: https://community.jboss.org/thread/169104
1. 오라클 JDBC 드라이버(ojdbc6.jar) 다운로드
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html
2. jBoss Oracle JDBC 모듈 추가
ojdbc6.jar 파일을 ${JBOSS_HOME}/modules/com/oracle/ojdbc6/main 디렉토리에 복사
위 디렉토리에 module.xml 파일을 생성하고 아래 내용으로 저장
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="com.oracle.ojdbc6">
<resources>
<resource-root path="ojdbc6.jar"/>
</resources>
<dependencies>
<module name="javax.api" />
<module name="javax.transaction.api"/>
<module name="javax.servlet.api" optional="true"/>
</dependencies>
</module>
3. DataSource 설정
${JBOSS_HOME}/standalone/configuration/standalone.xml에 DataSource 정보 추가
<datasources>
...
<datasource jndi-name="java:/TestDS" pool-name="TestDS" enabled="true">
<connection-url>jdbc:oracle:thin:@192.168.0.1:ORCL</connection-url>
<driver>oracle</driver>
<security>
<user-name>scott</user-name>
<password>tiger</password>
</security>
<validation>
<valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleValidConnectionChecker"/>
<stale-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleStaleConnectionChecker"/>
<exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.oracle.OracleExceptionSorter"/>
</validation>
</datasource>
<drivers>
...
<driver name="oracle" module="com.oracle.ojdbc6">
<xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
피드 구독하기:
댓글 (Atom)
댓글 없음:
댓글 쓰기