Skip to main content
Participant
July 9, 2008
Question

Connection pooling and contexts

  • July 9, 2008
  • 1 reply
  • 338 views
Hello.

I need to use contexts in Oracle so the first step requires me to execute a procedure and then execute a query.
Doing single tests this works perfectly, however my doubts arise for the scenario where 2 concurrent accesses for the database. each one sets the context and then call the query. This could cause that the connection used for the query was accessing the other user context.

I saw that we can do the following:

<cfquery ..>
<cfstoreproc ...>
</cfstoreproc>

select something from table
</cfquery>


Does anyone know if by doing this I'm forcing both actions to use the same connection without releasing it to the connection pool?
If it does not can you suggest a way to force that?

Thanks for all the input.
Regards,
Pedro Barbosa
This topic has been closed for replies.

1 reply

Inspiring
July 9, 2008
PBarbosa84 wrote:
> Does anyone know if by doing this I'm forcing both actions to use the same
> connection without releasing it to the connection pool?
> If it does not can you suggest a way to force that?

If you use a cftransaction the connection will not be released back to
the pool in between the different queries.

Jochem


--
Jochem van Dieten
Adobe Community Expert for ColdFusion