hi.

thanks for the info.

Question: if  H2's connection was not threadsafe, how would you deal with that?


-James


On Apr 20, 2010, at 7:41 PM, Chris Schanck wrote:

> The product I work on happily makes use of 100+ threads over 1 connection in 
> certain situations where multiple threads are evaluating different data 
> points which need to have the same transaction visibility. So far, H2 is 
> decent at this. 
> 
> Chris
> 
> On Mon, Apr 19, 2010 at 8:23 PM, James Gregurich <[email protected]> wrote:
> consider...
> 
> public synchronized void close() throws SQLException {
> 
> To me, it stands to reason that in a process, one should logically be using a 
> connection-per-thread pattern rather than sharing a connection over several 
> threads. As a result, my gut here says leave the synchronized out 
> here....there is no need for a connection to have access to it serialized. 
> Why have the extra mutex use here when in general, proper use, it isn't 
> needed.
> 
> Is there some legitimate reason that I'm not aware of why one would must have 
> a single connection shared over multiple threads?
> 
> 
> -James
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups "H2 
> Database" 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/h2-database?hl=en.
> 
> 
> 
> -- 
> C. Schanck
> 
> -- 
> You received this message because you are subscribed to the Google Groups "H2 
> Database" 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/h2-database?hl=en.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" 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/h2-database?hl=en.

Reply via email to