Hi Michael,
 I used the dafault isolation level that is READ COMMITTED.  If im in the same 
transaction dont u think that i need to get the values which were inserted in meth1() 
whether i commit meth1() or not?.

i start a transaction in remoteMeth()
call meth1() which uses entity bean to create records in the database.
now from remoteMeth() i call meth2() and try to access these records. And im not 
getting these records in meth2().
I think since im inserting records in the same transaction i need to get the records 
for updates in the same transaction context.
 If im trying to access the records in a different transaction context it shouldnt 
give me uncommitted records. But when in same transaction contect i should get the 
values.

Thank u very much

Cherry Mathew


--- tetex <[EMAIL PROTECTED]> wrote:
> 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