sqlMapClient.xml 설정파일에서
<!DOCTYPE sqlMapConfig
PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
"http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
<settings
cacheModelsEnabled="true"
enhancementEnabled="true"
lazyLoadingEnabled="true"
maxRequests="50"
maxSessions="25"
maxTransactions="10"
useStatementNamespaces="false"
/>
<!--Type aliases allow you to use a shorter name for long fully qualified class names. -->
<typeAlias alias="order" type="testdomain.Order"/>
<!-- Configure a built-in transaction manager. If you're using an
app server, you probably want to use its transaction manager
and a managed datasource -->
<transactionManager type="JDBC" commitRequired="false">
<dataSource type="JNDI">
<property name="DataSource" value="java:/comp/env/jdbc/DB"/>
</dataSource>
</transactionManager>
<!--sqlMap resource="C:\LuckyData\Project\Java1.5\data\ibatis\Member.xml"/-->
<sqlMap resource="board/board.xml"/>
<sqlMap resource="login/login.xml"/>
<sqlMap resource="db/dbChange.xml"/>
<sqlMap resource="statics/static.xml"/>
<!-- List more here...
<sqlMap resource="com/mydomain/data/Order.xml"/>
<sqlMap resource="com/mydomain/data/Documents.xml"/>
-->
</sqlMapConfig>
빨간색 부분처럼 바꿔준다. JNDI 물론 톰캣 SERVER.XML에 설정이 되있어야 겠다.
SERVER.XML
<Resource name="jdbc/IMARC" auth="Container" type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@XXX.XXX.XXX.X:XXX:XXXX"
username="XXXX" password="XXXX maxActive="20" maxIdle="10" maxWait="10000" />
</Context>
각자설정에 알맞게 바꿔야겠죠?^^
'웹개발' 카테고리의 다른 글
[웹개발/TIP] ie6,ie7,ie8, 인터넷 익스플로어에 따른 개발 방법 (0) | 2011.08.18 |
---|---|
[MyBatis/iBatis] 초간단 환경 설정 (0) | 2011.07.12 |
[MyBatis/iBATIS] iBATIS기초 - 설치 & 이클립스를 이용한 DB연동 (0) | 2011.07.12 |
[MyBatis/iBATIS] IBATIS기초 - IBATIS란? (0) | 2011.07.12 |
[JSP] 윈도우 XP에서 이클립스로 JSP 개발을 위한 환경설정 (0) | 2011.06.09 |