Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Java Sessions and Global Temp Table
On 22 Aug., 00:15, "userjohn" <userj..._at_mailinator.com> wrote:
> 10gR2
> Not a Java guy here.....
>
> Give a GTT (Global Temp Table), defines as "On DELETE Commit"....
>
> Is it possible that one Java/Oracle sessions running on JBOSS will "reuse"
> GTT thus seeing
> data from (OTHER) sessions ?
>
> I think I have run into this situation.
>
> thanks
Don't know much about Java and all it's related tools but if you have connection pooling on app server and it uses the same Oracle sessions without issuing commit then yea why not. User session1 using oracle sessionX inserts something in GTT without ending transaction (commit, rollback) and goes away, next user session2 comes in, takes the the same oracle sessionX, looks in GTT, and - oops there are some data left from previous user session1. The solution is - either there should be some commit/rollback after each user session stops working for a while or just do truncate GTT before inserting new data in it. If I rememeber correctly there were some performance problems in truncating GTTs in some 9i (?) versions though.
Gints Plivna
http://www.gplivna.eu
Received on Wed Aug 22 2007 - 01:13:03 CDT
![]() |
![]() |