Hello.

I think the problem may be in your database model or you do not using the 
transacted methods (you can point it out in your deployment descriptor) of 
the Session bean to manipulate the several entity beans that logically 
belonging to the same transaction. Do you understand?...

Ejb spec. prohibits the using of the synchronized blocks or methods ( EJB 
container knows "everything" how and where to use synchronization).

Hope this will help to find the right way.
The way of the synchronizing declaration is not right way for that.

Dmitriy Bocharov,
Aplana Software, Moscow.


>From: "Mike S." <[EMAIL PROTECTED]>
>Reply-To: "JDJList" <[EMAIL PROTECTED]>
>To: "JDJList" <[EMAIL PROTECTED]>
>Subject: [jdjlist] Re: HELP REQUIRED : COMPLEX TRANSACTIONS
>Date: Thu, 30 May 2002 15:09:10 +0300
>
>Hi, Krunal.
>
>I think that synchronization is the easiest way with sequence 
>unavailability.
>
>You wrote Thursday, May 30, 2002, 11:07:44:
>
>KS> Dear All,
>
>KS> I am using ejb (statelss session bean), and using bean managed 
>transaction
>KS> processing.
>KS> I have one method which includes inserts in one table (min. 8 rows) and 
>then
>KS> select
>KS> statements and one select includes max() +1 value of one column from 
>table,
>KS> using that
>KS> value makes insert into one table say 'A'. finally at the end of 
>method,
>KS> commiting the transaction.
>
>KS> The database data for table 'A' is becoming inconsistent as many users 
>are
>KS> firing the same method
>KS> and 2 or 3 users get same max+1 value as insert is done for that value.
>
>KS> I can not create a sequence due to some business function limitation.
>
>KS> One solution that we are thinking of is :
>KS> On server, create one class, having sync. get and set methods using one 
>flag
>KS> and in ejb
>KS> check that flag and then get max+1 value in order to control max+1 
>value
>KS> conflict.
>
>KS> Is this solution right ?
>
>
>--
>Regards,
>  Mike                          mailto:[EMAIL PROTECTED]
>
>
>To change your membership options, refer to:
>http://www.sys-con.com/java/list.cfm


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


To change your membership options, refer to:
http://www.sys-con.com/java/list.cfm

Reply via email to