users@glassfish.java.net

Re: Configuring global transactions

From: Marina Vatkina <marina.vatkina_at_oracle.com>
Date: Fri, 08 Mar 2013 10:31:36 -0800

Do you pass the connection around? In GlassFish the connection is bound
to a method invocation and needs to be acquired in the method in which
it is being used and closed at the end of that method.

-marina

On 3/8/13 3:39 AM, forums_at_java.net wrote:
> Hi, I'm trying to migrate one of our applications from Weblogic to
> Glassfish
> with the intention of upgrading it from EJB 2.1 to EJB 3. I'm having
> problems
> configuring global transactions for Oracle. In one part of the
> application,
> we create an Entity bean and store it in the database, later on in the
> transaction, we use a session bean to insert some data (the connection is
> obtained from the same datasource that the Entity bean uses), but get a
> foreign key constraint error because the operations don't appear to be
> part
> of the same transaction. I've set up my data source as follows (also see
> attached): Resource Type: javax.sql.DataSource Datasource Classname:
> oracle.jdbc.pool.OracleDataSource Non Transactional Connections: Disabled
> Transaction Isolation: Default level Isolation Level: Guaranteed If
> anyone
> can help shed some light on how I can get these transactions working
> I'd be
> very grateful. Thanks Richard
>
> --
>
> [Message sent by forum member 'riksweeney']
>
> View Post: http://forums.java.net/node/895526
>
>