users@glassfish.java.net

Re: JPA concurrent INSERT

From: Gregory Gerard <ggerard_at_mac.com>
Date: Wed, 10 Nov 2010 18:45:14 -0800

dang.

I think you'll just have to suspend the current use separate transaction to log the event -- if it fails to insert, it won't roll your outer transaction back (if appropriately marked and caught). At least it seems more palatable to do that than have mixed isolations.

greg

On Nov 10, 2010, at 14:56, forums_at_java.net wrote:

> Thanks for the tip. I'm using PostgreSQL 8.4 and it doesn't seem to have
> such a feature.
>
> Ryan
>
>
>
> [quote=ggerard]For such a simple task as recording, I'd use UPSERT if
> available. If the database is mysql, you can always just grab the connection
> and do an insert-on-duplicate-key-{update|ignore}. greg[/quote]
>
>
> --
>
> [Message sent by forum member 'rdelaplante']
>
> View Post: http://forums.java.net/node/715588
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>