일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- Struts
- swingx
- iBATIS
- JDOM
- phonegap
- Eclipse
- jQuery
- GPS
- MySQL
- Android
- ibsheet
- PHP
- oracle
- WebLogic
- 가우스
- appspresso
- 선택적조인
- node.js
- MFC
- PLSQL
- JSON
- tomcat
- Spring
- Ajax
- 전자정부프레임워크
- dock
- jsr 296
- Google Map
- rowspan
- sencha touch
Archives
- Today
- Total
Where The Streets Have No Name
Getting a Connection from an Application-Scoped Connection Pool(웹로직) 본문
Developement/Java
Getting a Connection from an Application-Scoped Connection Pool(웹로직)
highheat 2006. 4. 24. 17:39To get a connection from an application-scoped connection pool, you look up the data source defined in the weblogic-application.xml descriptor file in the local environment (java:comp/env
) and then request a connection from the data source. For example:
javax.sql.DataSource ds =
(javax.sql.DataSource) ctx.lookup("java:comp/env/myDataSource");
java.sql.Connection conn = ds.getConnection();
When you are finished using the connection, make sure you close the connection to return it to the connection pool:
conn.close();