안녕하십니까..
또 문의 드리게 되었습니다..
서로다른 혹은 서로 같은 table에 대하여 동시에 db 작업이 있습니다.
이 경우 각각의 모듈에 대하여 transaction을 따로 주면 되는지요
아니면 구지 이렇게 할 필요가 없는지요..
(그리고 앞에 '하안인' 님께서도 관련된 질문을 해 주셨던데요..)
제가 update send_date = now 이런 식으로 update 하고
(QrSlaedataExec 이용) TrSaleData 을 commit 까지 때렸으나,
다시 TrSaleDataOpen에서 select ... where send_date is null
해보면(QrSaleDataOpen이용)
위에서 QrSaleDataExec로 update 하고 TrSaleData를 commit 때렸음에도
불구하고, send_date가 null로 인식 되어 retrive 되어 집니다.
물론 ibconsole에서 select 문 때려 보면
send_date 가 정상적으로 update 된 것으로 나옵니다...
도대체 어떻게 된 것인지요...
흑흑흑
고수님들의 조언 부탁드립니다.
박한수 올림
1
----------------------------------------------
sale_data
----------------------------------------------
가맹점 번호
card_no
sale_date
send_date 센터로 전송후 ack message받은 날자
등등등
----------------------------------------------
----------------------------------------------
black_list
----------------------------------------------
card no (black list)
----------------------------------------------
2 <주요 업무>
1. 단말기로부터 올라온 매출 데이터를 real time으로 saledata에 insert 시킨다.
2. timer가 돌면서 select 문 (QrSaleDataOpen 이용) 을 돌려서
saledata의 자료 중, send_date = null 을 골라 packet에 싫어
center로 소켓통신으로 전송한다.
3. center로부터 정상적인 ack message가 오면, 방금 보내었던 자료의 send_date를 update한다.
(QrSlaedataExec)
4. 또 다른 socket을 이용하여 center로 부터 사용불가 카드 번호를 받아 select 문을 통하여
이미 존재하는지 확인 후 (QrBLOpen)없으면 black_list table에 insert (QrBLExec)한다.
5. 위의 작업은 동시에 realtime으로 동시에 이루어 진다.
3
DBSale - default transaction 없슴
TrSaleData - database name= dbsale
QrSaleDataOpen(select 전용) - transcation =trsaledata
QrSlaedataExec(execute 전용) = transaction 없음
TrBL (4번의 blacklist 전용 transaction) - database name = dbsale
QrBLOpen(select 전용) - transaction 속성= trbl
QrBLExec(execute 전요) - transcation 속성 = 없슴
TrTerm (1번의 단말기 data 전용 transaction) - database name = dbsale
QrTermOpen(select 전용) - transaction 속성=TrTerm
QrTermExec(execute 전용) - transcation 속성 = 없슴
--------------------------------------------------------------------------
|