May you check that
-
the isolation level is actually set (by calling the getTransactionIsolation
method), sometimes the setTransactionIsolation says nothing but does
nothing !
-
your operations on the EJBServer side are done within the scope of transactions
(transaction started by the EJB client and/or adequate attributes set for
the bean methods).
-
your "oracle client" also set the correct isolation level.
Best Regards,
François
Surendra wrote:
I have
set the isolation level for connection object that i amusing
but Its still not working(same error). I am using JDBC Driver IV(thin
driver) and for that i have classes111.zip file that containsall
my driver files. Do i need to set something for CMP also. RegardsSurendra
----- Original Message -----
Sent: Friday, April 13, 2001 3:36
PM
Subject: Re: Duplicate Key
Hi,
accessing a database concurrently from the EJB server and from outside
the EJB server is not always possible and thus leads to data uncohency
problems !
To be able to access (for update) a same database from the EJB server
and from outside the EJB Server (your oracle client), you must be sure
that the transaction isolation level of your JDBC driver is correctly set,
i.e. it should be TRANSACTION_SERIALIZABLE ! Unfortunately the default
isolation level is generally lower, and does not allow such concurrent
access.
To set the isolation level you can use the setTransactionIsolation
method defined on jdbc connections. In the next version of JOnAS (coming
2.3), it will be able to specify an isolation level to be set by the EJB
server for its jdbc connections.
However this could still not work, since not all JDBC drivers support
this isolation level ... We had to get a very recent Oracle JDBC driver
to be able to set such an isolation level.
Best Regards,
François
Surendra wrote:
Hi,
I have a CMP bean in which while
inserting a record in thetable first i fired a query on the database to
get the uniqueid (max id + 1 ) and then insert the record in the tableusing
create method, now if i delete the last inserted recordusing my oracle
client and try to insert a new record using myapplication it is giving
me javax.ejb.DuplicateKeyException error.If i restart the JOnAS
server then it works properly. What mightbe the problem. Is server doing
the caching? How can i solve this problem. RegardsSurendra
--
==================================================================
Francois EXERTIER Evidian
(Groupe Bull)
1, rue de Provence, BP 208, 38432
Echirolles cedex, FRANCE
mailto:[EMAIL PROTECTED]
http://www.evidian.com/jonas
http://www.objectweb.org/jonas
Tel: +33 (0)4 76 29 71 51 - Fax:
+33 (0)4 76 29 77 30
==================================================================
--
==================================================================
Francois EXERTIER Evidian
(Groupe Bull)
1, rue de Provence, BP 208, 38432
Echirolles cedex, FRANCE
mailto:[EMAIL PROTECTED]
http://www.evidian.com/jonas http://www.objectweb.org/jonas
Tel: +33 (0)4 76 29 71 51 - Fax:
+33 (0)4 76 29 77 30
==================================================================
----
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".
|