Wei�b�ck Maximilian wrote:
> 
> We have the following problem:
> 
> In a SessionBean S we call a method updateData() that does
> the following:
> 
>         Step 1)
>         it calls business methods from CMP Beans C that
>         change fileds in the Database.
> 
>         Step 2)
>         after this changes the session bean S gets a connection
>       and executes a query to remove the records whose fields
>         have not been changed
> 
> S.updateData() has the following Attributes:
> 
>         TransactionAttribute    = TX_REQUIRED;
>         IsolationLevel          = TRANSACTION_READ_UNCOMMITTED;
> 
> CMP Bean B has the following Attributes;
> 
>         TransactionAttribute    = TX_SUPPORTS;
>         IsolationLevel          = TRANSACTION_READ_UNCOMMITTED;
> 
> The problem is, that all records are removed in Step 2,
> even if the data has been fixed in Step 1.
> 
> We have to do this two Steps in one transaction, and we can not
> use a finder method for Step 2, as it is a join with other tables.
> 
> So how can I solve this problems, any ideas?
> 
> Thanks, Max
Hi Max, 
The problem is that with EJBs the entity bean state is written in the
database only at commit time, so when your session bean access the
database, even in the same transaction, the state has not been written.
This could work only if no data were cached in the server, and if the
isolation level is taken into account by your database.
Note that the isolation level is no longer set in deployment descriptors
(since EJB 1.1 spec.)
-- 
Philippe Durieux  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bull S.A  - 1 rue de Provence - 38432 Echirolles Cedex France
[EMAIL PROTECTED]  http://www-frec.bull.com
-> Download our EJBServer at http://www.bullsoft.com/ejb <-
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to