What's the isolation level for each connection?  I would consider this.

Michael

----- Original Message -----
From: "Cherry Mathew" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, October 20, 2001 6:35 AM
Subject: Problems in transactions


> Scenario,
>
> Session bean
> ------------
>  public void remoteMeth(){
>    meth1();
>    meth2();
>  }
>  public void meth1(){
>    //uses entity bean to insert data into the databaseTable
>    //transaction type is required
>  }
>  public void meth2(){
>   // gets a connection using JNDI lookup from the connection pool
>   // Does updates on the same table on which meth2 inserts data into
>   // transaction type is required
>   // the problem is that this function is not finding any rows in the
>     databaseTable to update
>  }
>
>  ( the inserts by the Entity bean succedes. )
>
>  from this what i think is that both the methods are not executing in the
same transaction context.
>  But why?. When the  call comes to the remote method a new transaction is
created. meth1() and meth2() should take this same transaction.
>
>  Am i missing something. The reason i can think of is because the entity
bean is using a new database connection to insert the row in the database
the transaction is not getting effect. And the meth2() gets a new database
connection. Work around is that i can use the entity bean for updates also
but that doesnt solve my doubt.
>
> Thanx in advance
>
> regards
> Cherry
>
>
===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff EJB-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to