2012/11/18 guilemsola <[email protected]>: > Hi All, > > I have a multithread application with threadstatic sessions that does some > job with files. It's using NH to consume from services and running on an > oracle db, so far so good. > > Every thread has a verbose log that uses stateless session to be more > lightweight. BTW when some files are processed I can see that lots of > cursors are managed in oracle for log session. > > For instance log: > > 324 SPC_LOG > 310 SPC_LOG > 121 SPC_LOG > > and application itself: > > 31 SPC_PRODUCTION_LINE_TEST > 27 SPC_PRODUCTION_LINE_TEST > 21 SPC_PRODUCTION_LINE_TEST > > This drives me to run out of Oracle cursors ORA-01000. > > Does somebody has an idea about what could cause this? I guess that every > thread at the end of it's life closes all sessions, regular and stateless.
I'm not aware of any automatic-close-session-on-thread-exit behavior. Sessions have no concept of threads at all. Supposedly a session stored in thread static storage will go out of reach when the thread ends and eventually be garbage collected, but there are no guarantees on when that will happen. Are you using the ThreadStaticSessionContext? /Oskar -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
