Re: [cx-oracle-users] Why do Connection and SessionPool objects not share an Environment?
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2006-09-19 13:49:50
|
It is not a stupid question. I'm not absolutely certain of the answer, either. :-) If I understand correctly, however, the environment handle is the "master" handle and all of the other handles are children to it. In order to establish thread safety you want to make sure that the handles from one thread are not used in another -- otherwise you need to establish locking and the like which has its own set of issues. Does that answer your question? May I ask why you asked the question in the first place? On 9/18/06, Alex Tingle <al...@fi...> wrote: > Hello, > > This is a question about the C implementation of cx_Oracle. I've been > reading the source code and trying to understand how you are using OCI. > > When a Connection is acquired from a SessionPool, it creates a brand new > environment for itself, rather than using the environment that the > SessionPool already has. That seems odd to me. (See Connection_Acquire() > and Connection_Init() in Connection.c.) > > Can you explain why you create a new environment? > > Are you following the OCI documentation (if so where - I can't find > anything that suggests this) or have you established the method's > reliability by experience? > > (Sorry in advance if this is a stupid question.) > > -Alex > > -- > :: Let me solve your problems: http://www.firetree.net/consulting/ > :: alex.tingle AT firetree.net +44-7901-552763 > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > |