[´äº¯] Connection°ú multithread


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

±Û¾´ÀÌ :°­½Åµ¿ 1998³â 9¿ù 09ÀÏ 08:59:35

In Reply to: Connetion POOL·Î ÇØ°áÇÕ´Ï´Ù. posted by À±Áö¼ö on 1998³â 9¿ù 08ÀÏ 22:19:21:

¾È³çÇϼ¼¿ä °­½Åµ¿ÀÔ´Ï´Ù.
¾Æ·¡´Â sybase¿¡¼­ ¿Â ´äº¯ÀÔ´Ï´Ù.
multithread¸¦ Áö¿øÇÑ´Ù°í ÇÕ´Ï´Ù.
PoolÀ» »ç¿ëÇÏÁö ¾Ê´õ¶óµµ °¡´ÉÇÑ ÀÏÀ̶ó°í ÇÕ´Ï´Ù.


¾Æ·¡ÀÇ ±ÛÀº sybaseÀÇ JDBC driverÀÎ jConnect4.0¿¡ ´ëÇÑ
±ÛÀÔ´Ï´Ù. °ü½ÉÀÖÀ¸½ÅºÐ²²¼­´Â Âü°íÇϽñ⠹ٶø´Ï´Ù.


Yes, this is a very good example of how JDBC can be used in a
web-server. You mentioned the work Transaction - as long as you
understand that every query executed on this connection shares
the same transaction context then this is fine.
By default JDBC starts in AUTOCOMMIT mode, so every query you
execute is committed immediately. If you change the transaction
mode to CHAINED, or if one of the queries does a "BEGIN TRANSACTION"
command, then you will have problems where queries executed on
one statement for one http request may interfer with queries
executed on other statements - because they all share the same
transaction.


dave


Kahng Shin Dong wrote:
>
> Hi.
>
> Example code is below:
> public SQLServlet extends HttpServlet
> {
> public static Connection con = null;
> static
> {
> con =
> DriverManager.getConnection("jdbc:sybase:Tds:sqlserver:port","user","password");
>
> }
> public void doGet(HttpServletRequest req, HttpServletResponse res)
> throws .....Exception
> {
> Statement stmt = con.createStatement();
> // query sql and execute sql using already created connection,
> }
> }
>
> This is possible, but has no problem ?
>
> Then , has no problem for Statement ?
>
> If possible and no problem, sql tranaction processes with high
> performance.....
>
> Thanks a lot. happy day to you.



´ÙÀ½ ±Ûµé:



À̾ ±Û¿Ã¸®±â(´äÇϱâ)

À̸§:
E-Mail:
Á¦¸ñ:
³»¿ë:
HTML ÅÂ±× Æ÷ÇÔ ¿©ºÎ: HTML ¹®¼­ÀÏ °æ¿ì üũ
°ü·Ã URL(¼±ÅÃ):
URL Á¦¸ñ(¼±ÅÃ):
°ü·Ã À̹ÌÁö URL:


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]