users@glassfish.java.net

Re: Glassfish Oracle Mystery

From: Sahoo <Sahoo_at_Sun.COM>
Date: Mon, 29 Oct 2007 12:21:18 +0530

With your *original* code, what SQL statements are executed when you run
your program? That might give a clue.
Also, are there any exceptions in the log file?

Thanks,
Sahoo

Kenneth Clark wrote:
> Nope, still nothing.
>
> I removed the em.getTransaction and added the em.flush() below the em.merge() and it is not committing the transactions. It is mind boggling because the em.persist is working but the em.merge does not!?!
>
> Any further ideas?
>
> ________________
> Thanks and regards
>
> Kenneth Clark
> Solutions Engineer
>
>
> Tel: 27 11 679 3075
> Mobile: 27 (0) 84 583 1348
> Email: kenneth.clark_at_skyetech.co.za
> Website: http://www.skyetech.co.za
>
>
> -----Original Message-----
> From: glassfish_at_javadesktop.org [mailto:glassfish_at_javadesktop.org]
> Sent: 28 October 2007 04:41
> To: users_at_glassfish.dev.java.net
> Subject: Re: Glassfish Oracle Mystery
>
> em.getTransaction() is intended for Java SE environment. You shouldn't use em.getTransaction() in your session beans. Your session bean by default uses container managed transaction so each business method already executes in the context of a JTA transaction. If this method is invoked via its webservice endpoint, the container will wrap the method body with a transaction. Not sure why the tx is not committed. You may want to try add a em.flush() after merge, though it is not really needed.
>
> -cheng
> [Message sent by forum member 'cf126330' (cf126330)]
>
> http://forums.java.net/jive/thread.jspa?messageID=242512
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.503 / Virus Database: 269.15.12/1097 - Release Date: 2007/10/28 13:58
>
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition.
> Version: 7.5.503 / Virus Database: 269.15.12/1097 - Release Date: 2007/10/28 13:58
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>