SQLServer Isolation Level Problem?
Since the MSSQLServer driver has trouble when returning explicit cursors, and since the complexitites of one of our procedures requires the use of cursors we have been forced to split a DBMS procedure into two. Ie. we have one method that updates the database and one that retrieves the "return value", ie. a setXXX and then a getXXX method.
The problem is that we sometimes get an empty resultset from the getXXX method. Note that this behaviour is not due to the server code as this error is not present if run directly on the SQLServer (ie, not through the JDBC driver). Now testing to and fro suggests that the error is caused by some sort of parallell behaviour or isolation level trouble in the driver, but what exactly? The thing is, if I insert a pause of a few milliseconds between the two calls it works correctly (of course I cannot place a "random" pause there in production code since the pause will probably vary depending on the underlying hardware). I have tried setting to different TransactionIsolation levels, but get the same result all the time. There is only one linear execution of the code as shown below (no multithreading in the java application).
What I'm wondering is: are there any "switches" to turn in relation to waiting for a a stored procedure to finish execution before the next is called? I would expect this to be implicit, but perhaps the SQLServer runs them in parallell and therefore the second method is called before the first is finished, but then, shouldn't the TransactionIsolationLevel of Serializable hinder this? I would appreciate any help on this one, sample code below, the problem being that wereas the while loop should always print the line it sometimes doesn't since the result is empty (not null, empty). It isn't the parameter to the execute_task either, we get the "missing result" problem with different paramaters that all always work when run directly on the SQLServer (via SQL Query Analyzer).
//Execute the update to the server
CallableStatement execute_task = connection.prepareCall("{call setXXX(?)}");
execute_task.setInt(1, 1);
execute_task.execute();
//Retrieve the task execution results:
CallableStatement show_execute_task = connection.prepareCall("{call getXXX}");
show_execute_task.execute();
ResultSet show_execute_resultset = show_execute_task.getResultSet();
while(show_execute_resultset.next()){
System.out.println("Result received");
}
Since the MSSQLServer driver has trouble when
returning explicit cursors, and since the
complexitites of one of our procedures requires the
use of cursors we have been forced to split a DBMS
procedure into two. Ie. we have one method that
updates the database and one that retrieves the
"return value", ie. a setXXX and then a getXXX method.
The problem is that we sometimes get an empty
resultset from the getXXX method. Note that this
behaviour is not due to the server code as this error
is not present if run directly on the SQLServer (ie,
not through the JDBC driver). Now testing to and fro
suggests that the error is caused by some sort of
parallell behaviour or isolation level trouble in the
driver, but what exactly? The thing is, if I insert a
pause of a few milliseconds between the two calls it
works correctly (of course I cannot place a "random"
pause there in production code since the pause will
probably vary depending on the underlying hardware).
I have tried setting to different
TransactionIsolation levels, but get the same result
all the time. There is only one linear execution of
the code as shown below (no multithreading in the
java application).
What I'm wondering is: are there any "switches" to
turn in relation to waiting for a a stored procedure
to finish execution before the next is called? I would
expect this to be implicit, but perhaps the SQLServer
runs them in parallell and therefore the second methodthis is what i would expect. parallel execution i mean... othewise you might as well use Access...
is called before the first is finished, but then,
shouldn't the TransactionIsolationLevel of
Serializable hinder this? I would appreciate any helpi'm not sure...
t be perfectly honest while i understand the different transaction levels on their face level as described in java.sql.Connection I am not entirely sure WHAT the expected behaviour actually is for each level.
not to get too OT here but for example TRANSACTION_REPEATABLE_READ
if the first transaction reads row 1 from tableA
then a second transaction changes row 1 in table A and commits the changes
the first transaction reads row 1 from table A again... what the heck is supposed to happen. i think it is supposed to read the same values as the first pass even though commited changes have been made but i'm not entirely sure.
on this one, sample code below, the problem being that
wereas the while loop should always print the line it
sometimes doesn't since the result is empty (not null,
empty). It isn't the parameter to the execute_task
either, we get the "missing result" problem with
different paramaters that all always work when run
directly on the SQLServer (via SQL Query Analyzer).
//Execute the update to the server
CallableStatement execute_task =
connection.prepareCall("{call setXXX(?)}");
execute_task.setInt(1, 1);
execute_task.execute();
//Retrieve the task execution results:
CallableStatement show_execute_task =
connection.prepareCall("{call getXXX}");
show_execute_task.execute();
ResultSet show_execute_resultset =
show_execute_task.getResultSet();
while(show_execute_resultset.next()){
System.out.println("Result received");
}i don't really follow your code too well here but here is what i would suggest...
fetch whatever the first procedure returns FIRST.
this should force your app to wait on this before you execute the second one.
does that make sense? it seems simple to me but maybe i'm missing something.
Similar Messages
-
Hi ,
I was using the DDConvertor supplied with WL51 to convert my old
DeploymentDescriptor.txt to the new XML format.
I have noticed that the Isolation Level did not pass to the new format.
My entity bean is not container managed and the Isolation level is
READ_COMMITED .
No weblogic-cmp-rdbms-jar.xml File was generated.
Attached are the files.
Could you please tell me where can I specify the Isolation Level if I have
no rdbms file ?
thanks
Amit Sivan
[DeploymentDescriptor.txt]
[weblogic-ejb-jar.xml]weblogic-ejb-jar.xml
amit sivan wrote:
Hi ,
I was using the DDConvertor supplied with WL51 to convert my old
DeploymentDescriptor.txt to the new XML format.
I have noticed that the Isolation Level did not pass to the new format.
My entity bean is not container managed and the Isolation level is
READ_COMMITED .
No weblogic-cmp-rdbms-jar.xml File was generated.
Attached are the files.
Could you please tell me where can I specify the Isolation Level if I have
no rdbms file ?
thanks
Amit Sivan
; Copyright (c) 1998-1999 by BEA WebXpress. All Rights Reserved.
(EntityDescriptor
beanHomeName pay2card.OnlineHomeEntity
enterpriseBeanClassName pay2card.beans.online.entity.OnlineEntityBean
homeInterfaceClassName pay2card.beans.online.entity.OnlineEntityHome
remoteInterfaceClassName pay2card.beans.online.entity.OnlineEntity
isReentrant false
(accessControlEntries
; DEFAULT [admin manager]
); end accessControlEntries
(controlDescriptors
(DEFAULT
isolationLevel TRANSACTION_READ_COMMITTED
transactionAttribute TX_REQUIRED
runAsMode CLIENT_IDENTITY
; runAsIdentity admin
); end DEFAULT
); end controlDescriptors
(environmentProperties
; homeClassName
; ejbObjectClassName
maxBeansInFreePool 20
maxBeansInCache 1000
idleTimeoutSeconds 60
; isModifiedMethodName isModified
); end environmentProperties
; Entity EJBean-specific properties:
primaryKeyClassName pay2card.beans.online.entity.OnlinePK
; end entity EJBean-specific properties.
); end EntityDescriptor
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>pay2card.OnlineHomeEntity</ejb-name>
<caching-descriptor>
<max-beans-in-free-pool>20</max-beans-in-free-pool>
<max-beans-in-cache>1000</max-beans-in-cache>
<idle-timeout-seconds>60</idle-timeout-seconds>
</caching-descriptor>
<persistence-descriptor>
<delay-updates-until-end-of-tx>false</delay-updates-until-end-of-tx>
</persistence-descriptor>
<jndi-name>pay2card.OnlineHomeEntity</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar> -
Jrun-resources.xml Isolation Level problem
Attempting to follow the Adobe TechNote at
http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=5444c687
creates log lines that imply the process works, but the datasource
is not usable via ColdFusion - calling it throws "Datasource DevDB
not found". Below are the log lines seeming to imply it does exist.
Why can MX 7.0.2 not see it?
11/08 15:43:12 info JRun DataSourceService: Created JDBC XA
Connection Pool named DevDB
11/08 15:43:12 info Bound a LinkRef from "DefaultDataSource"
to the default DataSource "DevDB"
11/08 15:43:12 info JRun Proxy Server listening on *:51011
11/08 15:43:13 info Deploying enterprise application
"Macromedia ColdFusion MX" from: file:/C:/CFusionMX7/
11/08 15:43:13 info Deploying web application "Macromedia
Coldfusion MX" from: file:/C:/CFusionMX7/Okay, I have gotten it to work with some modifications.
Removing the SeeFusion wrapper (which is a problem but not one I
see a solution to until CF8) and setting encrypted to false. No
matter how many times I copy the password from neo-query.xml into
jrun-resources.xml, it throws the following error. By setting
encrypted to false in jrun-resources.xml and using an unencrypted
password, the process works.
Error with encrypted true:
11/10 16:36:42 error Encountered the following error while
initializing JDBCPool: {0}
java.lang.ArrayIndexOutOfBoundsException: 6
at
jrun.security.Twofish_Algorithm.blockDecrypt(Twofish_Algorithm.java:572)
at
jrun.security.JRunCrypterForTwofish.decrypt(JRunCrypterForTwofish.java:86)
at jrun.sql.pool.JDBCPool.create(JDBCPool.java:551)
at jrunx.pool.ObjectPool.checkOut(ObjectPool.java:242)
at jrunx.pool.ObjectPool.init(ObjectPool.java:73)
at jrun.sql.pool.JDBCPool.init(JDBCPool.java:166)
at jrun.sql.pool.JDBCPool.<init>(JDBCPool.java:89)
at jrun.sql.pool.JDBCManager.createPool(JDBCManager.java:53)
at
jrun.sql.management.DataSourceService.start(DataSourceService.java:75)
at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at
jrun.deployment.resource.ResourceDeployer.startDataSources(ResourceDeployer.java:225)
at
jrun.deployment.resource.ResourceDeployer.start(ResourceDeployer.java:84)
at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at
jrunx.kernel.ServiceAdapter.invokeMethod(ServiceAdapter.java:705)
at
jrunx.kernel.JRunServiceDeployer.invokeOnServices(JRunServiceDeployer.java:460)
at
jrunx.kernel.JRunServiceDeployer.startServices(JRunServiceDeployer.java:312)
at
jrunx.kernel.JRunServiceDeployer.startLifecycle(JRunServiceDeployer.java:260)
at
jrunx.kernel.JRunServiceDeployer.deployServices(JRunServiceDeployer.java:87)
at
jrunx.kernel.DeploymentService.loadServices(DeploymentService.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at jrunx.kernel.JRun.startServer(JRun.java:575)
at jrunx.kernel.JRun.<init>(JRun.java:493)
at jrunx.kernel.JRun$1.run(JRun.java:346)
at java.security.AccessController.doPrivileged(Native
Method)
at jrunx.kernel.JRun.start(JRun.java:343)
at jrunx.kernel.JRun.startByNTService(JRun.java:427)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at jrunx.kernel.JRun.invoke(JRun.java:180)
at jrunx.kernel.JRun.main(JRun.java:168) -
Isolation level SERIALIZABLE problem
Hi there,
I have a problem with my stored procedures when the isolation level of the connection is serializable. I need to set this isolation level because of data consistency reasons.
When in this isolation level and a transaction tries to update or delete data modified by a transaction that commits after the serializable transaction began, I get this error:
ORA-08177: Cannot serialize access for this transaction
This is normal. The thing to do in this case is catch the error in the exception handler, rollback to a certain savepoint and try to do the update again.
The stored procedure that I use to test this is:
CREATE OR REPLACE PROCEDURE nm_test IS
tmpVar NUMBER;
err_num NUMBER;
err_msg VARCHAR2(200);
teller number;
BEGIN
teller := 0;
savepoint sp1;
<<try_every_thing_again>>
begin
tmpVar := 0;
update stock_prices set price = price + 1
where ric = 1;
DBMS_OUTPUT.Put_Line('teller = ' || teller);
EXCEPTION
WHEN others THEN
err_num := SQLCODE;
--err_msg := SUBSTR(SQLERRM, 1, 200);
if (err_num = -8177) then
rollback to savepoint sp1;
--DBMS_LOCK.SLEEP(1);
teller := teller + 1;
if (teller < 10) then
goto try_every_thing_again;
end if;
DBMS_OUTPUT.Put_Line('exception: teller = ' || teller);
end if;
end;
END nm_test;
I test this using 2 connections to the database. In the first connection I run the stored proc (without committing). Then I run the same stored proc in the second connection. This will block on the update (the is an implicit lock), which is ok. Then I commit the first connection. The second catches the error, rolls back and tries the update again....but then it catches the exception again, and again???
When I replace the "rollback to savepoint" by just "rollback", everything works fine (the exception is then caught only once) and the update succeeds on the second try.
But I can not work with just a "rollback" because my stored procedures might be called by others for which I don't want to undo all the work.
Do any of you know why I keep getting this error (the program ends up in an infinite loop if I didn't keep a counter and exit after 10 times)?
Marcel van VuureMarcel,
First of all, I'd be interested in hearing why you think you need serializable transactions (why 'read committed' doesn't work for your application). In the 8 years I've been building Oracle apps, I've never deemed it necessary to use serializable transactions. Maybe an optimistic locking strategy will solve your problem.
Secondly, if I were designing the interface, I wouldn't have a procedure in charge of both executing business logic AND retrying the logic in case of failure. I'd build a helper procedure that calls the procedure that does the work, looks for certain exceptions, and retries the procedure when necessary.
Lastly, if your interface doesn't have transactional control (the caller is in charge of commits and rollbacks), maybe you should simply attempt the update statement and throw an exception to the caller and let them handle it.
I'm sorry if I haven't directly solved your problem, but sometimes the best way to solve a problem is to question the decisions that got you there in the first place.
Hi there,
I have a problem with my stored procedures when the isolation level of the connection is serializable. I need to set this isolation level because of data consistency reasons.
When in this isolation level and a transaction tries to update or delete data modified by a transaction that commits after the serializable transaction began, I get this error:
ORA-08177: Cannot serialize access for this transaction
This is normal. The thing to do in this case is catch the error in the exception handler, rollback to a certain savepoint and try to do the update again.
The stored procedure that I use to test this is:
CREATE OR REPLACE PROCEDURE nm_test IS
tmpVar NUMBER;
err_num NUMBER;
err_msg VARCHAR2(200);
teller number;
BEGIN
teller := 0;
savepoint sp1;
<<try_every_thing_again>>
begin
tmpVar := 0;
update stock_prices set price = price + 1
where ric = 1;
DBMS_OUTPUT.Put_Line('teller = ' || teller);
EXCEPTION
WHEN others THEN
err_num := SQLCODE;
--err_msg := SUBSTR(SQLERRM, 1, 200);
if (err_num = -8177) then
rollback to savepoint sp1;
--DBMS_LOCK.SLEEP(1);
teller := teller + 1;
if (teller < 10) then
goto try_every_thing_again;
end if;
DBMS_OUTPUT.Put_Line('exception: teller = ' || teller);
end if;
end;
END nm_test;
I test this using 2 connections to the database. In the first connection I run the stored proc (without committing). Then I run the same stored proc in the second connection. This will block on the update (the is an implicit lock), which is ok. Then I commit the first connection. The second catches the error, rolls back and tries the update again....but then it catches the exception again, and again???
When I replace the "rollback to savepoint" by just "rollback", everything works fine (the exception is then caught only once) and the update succeeds on the second try.
But I can not work with just a "rollback" because my stored procedures might be called by others for which I don't want to undo all the work.
Do any of you know why I keep getting this error (the program ends up in an infinite loop if I didn't keep a counter and exit after 10 times)?
Marcel van Vuure -
Problems in using isolation level serializable
Dear everyone:
This is the problem I met while using isolation level
serializable in ORALCE 8.0.3 for Netware:
Program 1 Program2
Insert record 1 into table 1
select record 1 from table1
commit
select record1 from table1
insert record 2 into table1
select record2 from table1
commit
select record2 from table1
update record2 from table1
commit
delete record2 from table1
commit
update record1 from table1
*ORA-8177 cannot serialize
access for this transaction
According to my understanding to the serialization isolation
level, it should not occurs.
Anyone can give me some ideas?
Regards!
nullDear everyone:
This is the problem I met while using isolation level
serializable in ORALCE 8.0.3 for Netware:
Program 1 Program2
Insert record 1 into table 1
select record 1 from table1
commit
select record1 from table1
insert record 2 into table1
select record2 from table1
commit
select record2 from table1
update record2 from table1
commit
delete record2 from table1
commit
update record1 from table1
*ORA-8177 cannot serialize
access for this transaction
According to my understanding to the serialization isolation
level, it should not occurs.
Anyone can give me some ideas?
Regards!
null -
Changing Isolation Level Mid-Transaction
Hi,
I have a SS bean which, within a single container managed transaction, makes numerous
database accesses. Under high load, we start having serious contention issues
on our MS SQL server database. In order to reduce these issues, I would like
to reduce my isolation requirements in some of the steps of the transaction.
To my knowledge, there are two ways to achieve this: a) specify isolation at the
connection level, or b) use locking hints such as NOLOCK or ROWLOCK in the SQL
statements. My questions are:
1) If all db access is done within a single tx, can the isolation level be changed
back and forth?
2) Is it best to set the isolation level at the JDBC level or to use the MS SQL
locking hints?
Is there any other solution I'm missing?
Thanks,
SebastienGalen Boyer wrote:
On Sun, 28 Mar 2004, [email protected] wrote:
Galen Boyer wrote:
On Wed, 24 Mar 2004, [email protected] wrote:
Oracle's serializable isolation level doesn't offer what most
customers I've seen expect it to offer. They typically expect
that a serializable transaction will block any read-data from
being altered during the transaction, and oracle doesn't do
that.I haven't implemented WEB systems that employ anything but
the default concurrency control, because a web transaction is
usually very long running and therefore holding a connection
open during its life is unscalable. But, your statement did
make me curious. I tried a quick test case. IN ONE SQLPLUS
SESSION: SQL> alter session set isolation_level =
serializable; SQL> select * from t1; ID FL ---------- -- 1 AA
2 BB 3 CC NOW, IN ANOTHER SQLPLUS SESSION: SQL> update t1 set
fld = 'YY' where id = 1; 1 row updated. SQL> commit; Commit
complete. Now, back to the previous session. SQL> select *
from t1; ID FL ---------- -- 1 AA 2 BB 3 CC So, your
statement is incorrect.Hi, and thank you for the diligence to explore. No, actually
you proved my point. If you did that with SQLServer or Sybase,
your second session's update would have blocked until you
committed your first session's transaction. Yes, but this doesn't have anything to do with serializable.
This is the weak behaviour of those systems that say writers can
block readers.Weak or strong, depending on the customer point of view. It does guarantee
that the locking tx can continue, and read the real data, and eventually change
it, if necessary without fear of blockage by another tx etc.
In your example, you were able to change and commit the real
data out from under the first, serializable transaction. The
reason why your first transaction is still able to 'see the old
value' after the second tx committed, is not because it's
really the truth (else why did oracle allow you to commit the
other session?). What you're seeing in the first transaction's
repeat read is an obsolete copy of the data that the DBMS
made when you first read it. Yes, this is true.
Oracle copied that data at that time into the per-table,
statically defined space that Tom spoke about. Until you commit
that first transaction, some other session could drop the whole
table and you'd never know it.This is incorrect.Thanks. Point taken. It is true that you could have done a complete delete
of all rows in the table though..., correct?
That's the fast-and-loose way oracle implements
repeatable-read! My point is that almost everyone trying to
serialize transactions wants the real data not to
change. Okay, then you have to lock whatever you read, completely.
SELECT FOR UPDATE will do this for your customers, but
serializable won't. Is this the standard definition of
serializable of just customer expectation of it? AFAIU,
serializable protects you from overriding already committed
data.The definition of serializable is loose enough to allow
oracle's implementation, but non-changing relevant data is
a typically understood hope for serializable. Serializable
transactions typically involve reading and writing *only
already committed data*. Only DIRTY_READ allows any access to
pre-committed data. The point is that people assume that a
serializable transaction will not have any of it's data re
committed, ie: altered by some other tx, during the serializable
tx.
Oracle's rationale for allowing your example is the semantic
arguement that in spite of the fact that your first transaction
started first, and could continue indefinitely assuming it was
still reading AA, BB, CC from that table, because even though
the second transaction started later, the two transactions *so
far*, could have been serialized. I believe they rationalize it by saying that the state of the
data at the time the transaction started is the state throughout
the transaction.Yes, but the customer assumes that the data is the data. The customer
typically has no interest in a copy of the data staying the same
throughout the transaction.
Ie: If the second tx had started after your first had
committed, everything would have been the same. This is true!
However, depending on what your first tx goes on to do,
depending on what assumptions it makes about the supposedly
still current contents of that table, it may ether be wrong, or
eventually do something that makes the two transactions
inconsistent so they couldn't have been serialized. It is only
at this later point that the first long-running transaction
will be told "Oooops. This tx could not be serialized. Please
start all over again". Other DBMSes will completely prevent
that from happening. Their value is that when you say 'commit',
there is almost no possibility of the commit failing. But this isn't the argument against Oracle. The unable to
serialize doesn't happen at commit, it happens at write of
already changed data. You don't have to wait until issuing
commit, you just have to wait until you update the row already
changed. But, yes, that can be longer than you might wish it to
be. True. Unfortunately the typical application writer logic may
do stuff which never changes the read data directly, but makes
changes that are implicitly valid only when the read data is
as it was read. Sometimes the logic is conditional so it may never
write anything, but may depend on that read data staying the same.
The issue is that some logic wants truely serialized transactions,
which block each other on entry to the transaction, and with
lots of DBMSes, the serializable isolation level allows the
serialization to start with a read. Oracle provides "FOR UPDATE"
which can supply this. It is just that most people don't know
they need it.
With Oracle and serializable, 'you pay your money and take your
chances'. You don't lose your money, but you may lose a lot of
time because of the deferred checking of serializable
guarantees.
Other than that, the clunky way that oracle saves temporary
transaction-bookkeeping data in statically- defined per-table
space causes odd problems we have to explain, such as when a
complicated query requires more of this memory than has been
alloted to the table(s) the DBMS will throw an exception
saying it can't serialize the transaction. This can occur even
if there is only one user logged into the DBMS.This one I thought was probably solved by database settings,
so I did a quick search, and Tom Kyte was the first link I
clicked and he seems to have dealt with this issue before.
http://tinyurl.com/3xcb7 HE WRITES: serializable will give you
repeatable read. Make sure you test lots with this, playing
with the initrans on the objects to avoid the "cannot
serialize access" errors you will get otherwise (in other
databases, you will get "deadlocks", in Oracle "cannot
serialize access") I would bet working with some DBAs, you
could have gotten past the issues your client was having as
you described above.Oh, yes, the workaround every time this occurs with another
customer is to have them bump up the amount of that
statically-defined memory. Yes, this is what I'm saying.
This could be avoided if oracle implemented a dynamically
self-adjusting DBMS-wide pool of short-term memory, or used
more complex actual transaction logging. ? I think you are discounting just how complex their logging
is. Well, it's not the logging that is too complicated, but rather
too simple. The logging is just an alternative source of memory
to use for intra-transaction bookkeeping. I'm just criticising
the too-simpleminded fixed-per-table scratch memory for stale-
read-data-fake-repeatable-read stuff. Clearly they could grow and
release memory as needed for this.
This issue is more just a weakness in oracle, rather than a
deception, except that the error message becomes
laughable/puzzling that the DBMS "cannot serialize a
transaction" when there are no other transactions going on.Okay, the error message isn't all that great for this situation.
I'm sure there are all sorts of cases where other DBMS's have
laughable error messages. Have you submitted a TAR?Yes. Long ago! No one was interested in splitting the current
message into two alternative messages:
"This transaction has just become unserializable because
of data changes we allowed some other transaction to do"
or
"We ran out of a fixed amount of scratch memory we associated
with table XYZ during your transaction. There were no other
related transactions (or maybe even users of the DBMS) at this
time, so all you need to do to succeed in future is to have
your DBA reconfigure this scratch memory to accomodate as much
as we may need for this or any future transaction."
I am definitely not an Oracle expert. If you can describe for
me any application design that would benefit from Oracle's
implementation of serializable isolation level, I'd be
grateful. There may well be such.As I've said, I've been doing web apps for awhile now, and
I'm not sure these lend themselves to that isolation level.
Most web "transactions" involve client think-time which would
mean holding a database connection, which would be the death
of a web app.Oh absolutely. No transaction, even at default isolation,
should involve human time if you want a generically scaleable
system. But even with a to-think-time transaction, there is
definitely cases where read-data are required to stay as-is for
the duration. Typically DBMSes ensure this during
repeatable-read and serializable isolation levels. For those
demanding in-the-know customers, oracle provided the select
"FOR UPDATE" workaround.Yep. I concur here. I just think you are singing the praises of
other DBMS's, because of the way they implement serializable,
when their implementations are really based on something that the
Oracle corp believes is a fundamental weakness in their
architecture, "Writers block readers". In Oracle, this never
happens, and is probably one of the biggest reasons it is as
world-class as it is, but then its behaviour on serializable
makes you resort to SELECT FOR UPDATE. For me, the trade-off is
easily accepted.Well, yes and no. Other DBMSes certainly have their share of faults.
I am not critical only of oracle. If one starts with Oracle, and
works from the start with their performance arcthitecture, you can
certainly do well. I am only commenting on the common assumptions
of migrators to oracle from many other DBMSes, who typically share
assumptions of transactional integrity of read-data, and are surprised.
If you know Oracle, you can (mostly) do everything, and well. It is
not fundamentally worse, just different than most others. I have had
major beefs about the oracle approach. For years, there was TAR about
oracle's serializable isolation level *silently allowing partial
transactions to commit*. This had to do with tx's that inserted a row,
then updated it, all in the one tx. If you were just lucky enough
to have the insert cause a page split in the index, the DBMS would
use the old pre-split page to find the newly-inserted row for the
update, and needless to say, wouldn't find it, so the update merrily
updated zero rows! The support guy I talked to once said the developers
wouldn't fix it "because it'd be hard". The bug request was marked
internally as "must fix next release" and oracle updated this record
for 4 successive releases to set the "next release" field to the next
release! They then 'fixed' it to throw the 'cannot serialize' exception.
They have finally really fixed it.( bug #440317 ) in case you can
access the history. Back in 2000, Tom Kyte reproduced it in 7.3.4,
8.0.3, 8.0.6 and 8.1.5.
Now my beef is with their implementation of XA and what data they
lock for in-doubt transactions (those that have done the prepare, but
have not yet gotten a commit). Oracle's over-simple logging/locking is
currently locking pages instead of rows! This is almost like Sybase's
fatal failure of page-level locking. There can be logically unrelated data
on those pages, that is blocked indefinitely from other equally
unrelated transactions until the in-doubt tx is resolved. Our TAR has
gotten a "We would have to completely rewrite our locking/logging to
fix this, so it's your fault" response. They insist that the customer
should know to configure their tables so there is only one datarow per
page.
So for historical and current reasons, I believe Oracle is absolutely
the dominant DBMS, and a winner in the market, but got there by being first,
sold well, and by being good enough. I wish there were more real market
competition, and user pressure. Then oracle and other DBMS vendors would
be quicker to make the product better.
Joe -
Can you set isolation levels of message-driven bean transactions?
The problem: I have 3 different message-driven beans which each get a different type of message, except for a field that is common to all. That field is used as the primary key of an entity object. The message-driven beans configured to use a container managed transaction. Each message-driven bean, in processing the message, first does a lookup by primary key to see if the object associated with the key exists, and if it does not, it requests the entity's home object to create it. After that, they do further processing. The problem is that sometimes all the beans simultaneously get a message, resulting in each bean checking for the entity object at about the same time, and if they fail to find it (because none of them has created it yet), each creates an object, all with the same primary key. This is not caught until the beans start to complete their onMessage method, which I believe results in the container committing the transaction. One of the transactions will be committed successfully, while the other two will fail, get rolled back, and then be retried with the same message. The second time through, the other beans will find the entity object (since it has been created and committed) and they will complete correctly. In the end, they right thing occurs, except that there is a troubling exception or 2 in the log telling about the constraint violation (with the primary key) and the rollback. If it was just me, that would be fine, but our customer does not like to see exceptions in the log; that indicates to him that something is wrong.
So, I am looking for someway to make sure that the actions of the message-driven beans are serialized. One suggestion from a colleague was to set the isolation level of the transactions being used by the container in processing the message-driven beans' onMessage method. However, the documentation does not mention any way to do this for a message-driven bean. Suggestions?
Is the use of a UserTransaction a better way to do this? If I acquire a UserTransaction within the onMessage method of a message-driven bean, can I set its isolation level? How would this work? When I get a UserTransaction, does each client get a different transaction, or do they all get the same one?(1) The WebLogic JMS "unit-of-order" feature is a heavily adopted feature that was specifically designed to handle similar use cases - see the JMS developer guide for extensive documentation. In your use case, if "key" is used to define UOO, then there's no limit on the number of keys that can be processed concurrently, but messages for any particular key will be processed single-threaded in the order in which they were first submitted.
Note that if you're using distributed destinations, the UOO feature is still fully supported - but the developer and/or administrator needs to decide whether to configure the destination to use "hash" or "path service" based routing (the JMS UOO edoc outlines the trade-offs).
(2) Another alternative is to use a single MDB with max-beans-free-pool that processes all three types (as the other poster suggested). I think this assumes all MDBs run on the same JVM.
(3) Another alternative is to use multiple queues, with a single MDB on each Q. Where some sort of hash algorithm is used to determine which Q is for the key. This approach is a "hand-coded" variant of the approach in (1) with "hash" based routing enabled...
(4) If all MDBs actually do run in the same JVM, a third alternative is to use code the application to use a common lock to protect each key, eg, something like:
// assume MyLock is simply a class with a "reference counter"
// assume some global "staticHM" hash map that is all MDBs can access
onMessage() {
MyLock lock = null;
key= msg.getKey();
synchronized(staticHM) {
lock = staticHM.get();
if (lock = null) {
lock = new lock();
staticHM.put(key, new lock());
lock.incRefCount();
try {
synchronized(lock) {
// only one onMessage will be able to lock a particular key at a time
do your work;
} finally {
synchronized(staticHT) {
if (lock.defRefCount() == 0) staticHM.remove(lock);
if (lock = null) staticHM.put(key);
If multiple threads get a message with the same key, then only one thread at a time will work on the key.
Hope this helps,
Tom -
Bug in Oracle's handling of transaction isolation levels?
Hello,
I think there is a bug in Oracle 9i database related to serializable transaction isolation level.
Here is the information about the server:
Operating System: Microsoft Windows 2000 Server Version 5.0.2195 Service Pack 2 Build 2195
System type: Single CPU x86 Family 6 Model 8 Stepping 10 GenuineIntel ~866 MHz
BIOS-Version: Award Medallion BIOS v6.0
Locale: German
Here is my information about the client computer:
Operaing system: Microsoft Windows XP
System type: IBM ThinkPad
Language for DB access: Java
Database information:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
The database has been set up using the default settings and nothing has been changed.
To reproduce the bug, follow these steps:
1. Create a user in 9i database called 'kaon' with password 'kaon'
2. Using SQL Worksheet create the following table:
CREATE TABLE OIModel (
modelID int NOT NULL,
logicalURI varchar (255) NOT NULL,
CONSTRAINT pk_OIModel PRIMARY KEY (modelID),
CONSTRAINT logicalURI_OIModel UNIQUE (logicalURI)
3. Run the following program:
package test;
import java.sql.*;
public class Test {
public static void main(String[] args) throws Exception {
java.util.Locale.setDefault(java.util.Locale.US);
Class.forName("oracle.jdbc.OracleDriver");
Connection connection=DriverManager.getConnection("jdbc:oracle:thin:@schlange:1521:ORCL","kaon","kaon");
DatabaseMetaData dmd=connection.getMetaData();
System.out.println("Product version:");
System.out.println(dmd.getDatabaseProductVersion());
System.out.println();
connection.setAutoCommit(false);
connection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE);
int batches=0;
int counter=2000;
for (int outer=0;outer<50;outer++) {
for (int i=0;i<200;i++) {
executeUpdate(connection,"INSERT INTO OIModel (modelID,logicalURI) VALUES ("+counter+",'start"+counter+"')");
executeUpdate(connection,"UPDATE OIModel SET logicalURI='next"+counter+"' WHERE modelID="+counter);
counter++;
connection.commit();
System.out.println("Batch "+batches+" done");
batches++;
protected static void executeUpdate(Connection conn,String sql) throws Exception {
Statement s=conn.createStatement();
try {
int result=s.executeUpdate(sql);
if (result!=1)
throw new Exception("Should update one row, but updated "+result+" rows, query is "+sql);
finally {
s.close();
The program prints the following output:
Product version:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
Batch 0 done
Batch 1 done
java.lang.Exception: Should update one row, but updated 0 rows, query is UPDATE OIModel SET logicalURI='next2571' WHERE modelID=2571
at test.Test.executeUpdate(Test.java:35)
at test.Test.main(Test.java:22)
That is, after several iterations, the executeUpdate() method returns 0, rather than 1. This is clearly an error.
4. Leave the database as is. Replace the line
int counter=2000;
with line
int counter=4000;
and restart the program. The following output is generated:
Product version:
Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.1.0 - Production
Batch 0 done
Batch 1 done
java.sql.SQLException: ORA-08177: can't serialize access for this transaction
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:573)
at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1891)
at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1093)
at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2047)
at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1940)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2709)
at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:796)
at test.Test.executeUpdate(Test.java:33)
at test.Test.main(Test.java:22)
This is clearly an error - only one transaction is being active at the time, so there is no need for serialization of transactions.
5. You can restart the program as many times you wish (by chaging the initial counter value first). The same error (can't serialize access for this transaction) will be generated.
6. The error doesn't occur if the transaction isolation level isn't changed.
7. The error doesn't occur if the UPDATE statement is commented out.
Sincerely yours
Boris MotikI have a similar problem
I'm using Oracle and serializable isolation level.
Transaction inserts 4000 objects and then updates about 1000 of these objects.
Transactions sees inserted objects but cant update them (row not found or can't serialize access for this transaction are thrown).
On 3 tries for this transaction 1 succeds and 2 fails with one of above errors.
No other transactions run concurently.
In read commited isolation error doesn't arise.
I'm using plain JDBC.
Similar or even much bigger serializable transaction works perfectly on the same database as plsql procedure.
I've tried oci and thin (Oracle) drivers and oranxo demo (i-net) driver.
And this problems arises on all of this drivers.
This problem confused me so much :(.
Maby one of Oracle users, developers nows cause of this strange behaviour.
Thanx for all answers. -
Setting isolation level with JDriver for Oracle/XA
edocs (http://e-docs.bea.com/wls/docs70/oracle/trxjdbcx.html#1080746) states that,
if using jDriver for Oracle/XA you can not set the transaction isolation level
for a transaction and that 'Transactions use the transaction isolation level set
on the connection or the default transaction isolation level for the database'.
Does this mean that you shouldn't try to set it programatically (fair enough)
or that you can't set it in the weblogic deployment descriptor either? Also anybody
got any idea what the default is likely to be if you are using an Oracle 9iR2
database? Is this determined by some database setting?IJ wrote:
edocs (http://e-docs.bea.com/wls/docs70/oracle/trxjdbcx.html#1080746) states that,
if using jDriver for Oracle/XA you can not set the transaction isolation level
for a transaction and that 'Transactions use the transaction isolation level set
on the connection or the default transaction isolation level for the database'.
Does this mean that you shouldn't try to set it programatically (fair enough)
or that you can't set it in the weblogic deployment descriptor either? Also anybody
got any idea what the default is likely to be if you are using an Oracle 9iR2
database? Is this determined by some database setting?The system should honor the setting defined in the deployment descriptor,
however, for oracle it may not be helpful to change it. Oracle provides two
isolation levels. The default is always READ_COMMITTED. The other
setting is SERIALIZABLE, but this hurts performance, and is also problematic
in the way oracle implements it. For instance, even if you set SERIALIZABLE,
oracle will not lock read data. It will allow other transactions to read and/or
alter data trhat another ongoing SERIALIZABLE transaction has read. The
only way to really lock read data in oracle is to issue oracle-specific SQL in
your select: "SELECT ..... FOR UPDATE".
All in all, you should collect a strong case for why you can't proceed with
READ_COMMITTED first. Then you should research oracle's recommendations
(and their problem record) with SERIALIZABLE.
Joe Weinstein at BEA -
Hi,
Im using Kodo 3.0.0 on Oracle 8.1.7.
I tried to define the isolation level in the kodo.properties:
e.g.: kodo.jdbc.TransactionIsolation: serializable
Unfortunately Oracle throws an exception which says, that "set
transaction" has to be the first statement called within a transaction. I
get this exception on almost every db access.
java.sql.SQLException: ORA-01453: SET TRANSACTION muss erste Anweisung der
Transaktion sein
at
kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
at
kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
at
kodo.jdbc.schema.LazySchemaFactory.findTable(LazySchemaFactory.java:1
50)
at
kodo.jdbc.meta.VerticalClassMapping.fromMappingInfo(VerticalClassMapp
ing.java:135)
at
kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvid
er.java:56)
at
kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository
java:342)
at
kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:29
7)
at
kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository
java:325)
at
kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:29
7)
at
kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:2
72)
at
kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:
256)
at kodo.query.AbstractQuery.internalCompile(AbstractQuery.java:538)
at kodo.query.AbstractQuery.compile(AbstractQuery.java:502)
at kodo.datacache.CacheAwareQuery.compile(CacheAwareQuery.java:265)
-- WolfgangMarc,
Here you go...
kodo.util.FatalDataStoreException: ORA-01453: SET TRANSACTION must be
first statement of transaction
at
kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:897)
at kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
at
kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:566)
at
edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction.initTestModel(AbstractConcurrentAction.java:290)
at
edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction$InitRunnable.run(AbstractConcurrentAction.java:212)
at
edu.sjsu.recon.util.ConcurrencyUtilities.executeSynchronized(ConcurrencyUtilities.java:20)
at
edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction.setup(AbstractConcurrentAction.java:75)
at
edu.sjsu.recon.execution.ServerExecutor.beforeExecute(ServerExecutor.java:27)
at
edu.sjsu.recon.execution.AbstractExecutor.execute(AbstractExecutor.java:43)
at
edu.sjsu.recon.execution.DefaultExecutionCoordinator.executeAction(DefaultExecutionCoordinator.java:25)
at
edu.sjsu.recon.server.handler.ExecutionRequestHandler.handleRequest(ExecutionRequestHandler.java:63)
at edu.sjsu.recon.server.RequestProcessor.run(RequestProcessor.java:90)
NestedThrowablesStackTrace:
kodo.util.DataStoreException: ORA-01453: SET TRANSACTION must be first
statement of transaction
at
kodo.jdbc.sql.DBDictionary.newDataStoreException(DBDictionary.java:3004)
at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:77)
at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:63)
at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:43)
at kodo.jdbc.runtime.JDBCStoreManager.connect(JDBCStoreManager.java:871)
at
kodo.jdbc.runtime.JDBCStoreManager.retainConnection(JDBCStoreManager.java:189)
at kodo.jdbc.runtime.JDBCStoreManager.begin(JDBCStoreManager.java:114)
at
kodo.runtime.DelegatingStoreManager.begin(DelegatingStoreManager.java:95)
at
kodo.runtime.PersistenceManagerImpl.flushInternal(PersistenceManagerImpl.java:1004)
at
kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:885)
at kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
at
kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:566)
at
edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction.initTestModel(AbstractConcurrentAction.java:290)
at
edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction$InitRunnable.run(AbstractConcurrentAction.java:212)
at
edu.sjsu.recon.util.ConcurrencyUtilities.executeSynchronized(ConcurrencyUtilities.java:20)
at
edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction.setup(AbstractConcurrentAction.java:75)
at
edu.sjsu.recon.execution.ServerExecutor.beforeExecute(ServerExecutor.java:27)
at
edu.sjsu.recon.execution.AbstractExecutor.execute(AbstractExecutor.java:43)
at
edu.sjsu.recon.execution.DefaultExecutionCoordinator.executeAction(DefaultExecutionCoordinator.java:25)
at
edu.sjsu.recon.server.handler.ExecutionRequestHandler.handleRequest(ExecutionRequestHandler.java:63)
at edu.sjsu.recon.server.RequestProcessor.run(RequestProcessor.java:90)
NestedThrowablesStackTrace:
java.sql.SQLException: ORA-01453: SET TRANSACTION must be first statement
of transaction
at
oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:305)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:272)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:623)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:112)
at oracle.jdbc.driver.T4CStatement.execute_for_rows(T4CStatement.java:474)
at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1028)
at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1516)
at
oracle.jdbc.driver.PhysicalConnection.setTransactionIsolation(PhysicalConnection.java:1412)
at
com.solarmetric.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:266)
at
com.solarmetric.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:266)
at
com.solarmetric.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:266)
at
com.solarmetric.jdbc.DelegatingConnection.setTransactionIsolation(DelegatingConnection.java:266)
at
com.solarmetric.jdbc.ConfiguringConnectionDecorator.decorate(ConfiguringConnectionDecorator.java:93)
at
com.solarmetric.jdbc.DecoratingDataSource.decorate(DecoratingDataSource.java:90)
at
com.solarmetric.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:82)
at
com.solarmetric.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:131)
at
kodo.jdbc.schema.DataSourceFactory$DefaultsDataSource.getConnection(DataSourceFactory.java:305)
at
kodo.jdbc.runtime.JDBCStoreManager.connectInternal(JDBCStoreManager.java:887)
at kodo.jdbc.runtime.JDBCStoreManager.connect(JDBCStoreManager.java:865)
at
kodo.jdbc.runtime.JDBCStoreManager.retainConnection(JDBCStoreManager.java:189)
at kodo.jdbc.runtime.JDBCStoreManager.begin(JDBCStoreManager.java:114)
at
kodo.runtime.DelegatingStoreManager.begin(DelegatingStoreManager.java:95)
at
kodo.runtime.PersistenceManagerImpl.flushInternal(PersistenceManagerImpl.java:1004)
at
kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:885)
at kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
at
kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:566)
at
edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction.initTestModel(AbstractConcurrentAction.java:290)
at
edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction$InitRunnable.run(AbstractConcurrentAction.java:212)
at
edu.sjsu.recon.util.ConcurrencyUtilities.executeSynchronized(ConcurrencyUtilities.java:20)
at
edu.sjsu.recon.contribution.action.jdo.v10.kodo.v32.oracle.v101.simple.concurrency.AbstractConcurrentAction.setup(AbstractConcurrentAction.java:75)
at
edu.sjsu.recon.execution.ServerExecutor.beforeExecute(ServerExecutor.java:27)
at
edu.sjsu.recon.execution.AbstractExecutor.execute(AbstractExecutor.java:43)
at
edu.sjsu.recon.execution.DefaultExecutionCoordinator.executeAction(DefaultExecutionCoordinator.java:25)
at
edu.sjsu.recon.server.handler.ExecutionRequestHandler.handleRequest(ExecutionRequestHandler.java:63)
at edu.sjsu.recon.server.RequestProcessor.run(RequestProcessor.java:90)
Marc Prud'hommeaux wrote:
Cleo-
Can you post the complete stack (including all the nested stack traces)?
In article <[email protected]>, Cleo wrote:
Marc,
Here is the stack:
ORA-01453: SET TRANSACTION must be first statement of transaction
kodo.util.FatalDataStoreException
at
kodo.runtime.PersistenceManagerImpl.beforeCompletion(PersistenceManagerImpl.java:897)
at kodo.runtime.LocalManagedRuntime.commit(LocalManagedRuntime.java:69)
at
kodo.runtime.PersistenceManagerImpl.commit(PersistenceManagerImpl.java:566)
This is the code being executed:
Transaction initTransaction = initPersistenceManager.currentTransaction();
initTransaction.begin();
initPersistenceManager.makePersistentAll(model);
initTransaction.commit(); //EXCEPTION HERE
initPersistenceManager.close();
thx
Marc Prud'hommeaux wrote:
Cleo-
Can you post the complete stack trace from the exception? I expect it is
different from the one posted previously (which was with a much earlier
version of Kodo).
In article <[email protected]>, Cleo wrote:
Has anybody figured out how to solve this?
I am having the same problem with:
KODO 3.2
Oracle JDBC Dirver 10.1.0.3
thx
PS: (I am on a deadline for the end of this week)
Stephen Kim wrote:
First I would suggest using Kodo 3.0.1. Second I would suggest trying
to use 9.0.1 drivers which work very well with 8.1.7.
Wolfgang Hutya wrote:
Hi,
Im using Kodo 3.0.0 on Oracle 8.1.7.
I tried to define the isolation level in the kodo.properties:
e.g.: kodo.jdbc.TransactionIsolation: serializable
Unfortunately Oracle throws an exception which says, that "set
transaction" has to be the first statement called within a
transaction.
I
get this exception on almost every db access.
java.sql.SQLException: ORA-01453: SET TRANSACTION muss erste
Anweisung
der
Transaktion sein
at
kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:42)
at
kodo.jdbc.sql.SQLExceptions.getFatalDataStore(SQLExceptions.java:24)
at
kodo.jdbc.schema.LazySchemaFactory.findTable(LazySchemaFactory.java:1
50)
at
kodo.jdbc.meta.VerticalClassMapping.fromMappingInfo(VerticalClassMapp
ing.java:135)
at
kodo.jdbc.meta.RuntimeMappingProvider.getMapping(RuntimeMappingProvid
er.java:56)
at
kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository
java:342)
at
kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:29
7)
at
kodo.jdbc.meta.MappingRepository.getMappingInternal(MappingRepository
java:325)
at
kodo.jdbc.meta.MappingRepository.getMapping(MappingRepository.java:29
7)
at
kodo.jdbc.meta.MappingRepository.getMappings(MappingRepository.java:2
72)
at
kodo.jdbc.meta.MappingRepository.getMetaDatas(MappingRepository.java:
256)
atkodo.query.AbstractQuery.internalCompile(AbstractQuery.java:538)
at kodo.query.AbstractQuery.compile(AbstractQuery.java:502)
atkodo.datacache.CacheAwareQuery.compile(CacheAwareQuery.java:265)
-- Wolfgang
Steve Kim
[email protected]
SolarMetric Inc.
http://www.solarmetric.com
Marc Prud'hommeaux
SolarMetric Inc.
Marc Prud'hommeaux
SolarMetric Inc. -
Setting Isolation Level In A UserTransaction
We are having a problem where a class creates a UserTransaction from the InitialContext,
but does not see any database changes made by other EJBs even though they have
been committed. This "seems" like an isolation issue.
What is the default isolation level for UserTransaction? And since it appears
that it is not seeing committed data, what level should it be set to? (i.e. TRANSACTION_READ_COMMITTED
would be nice...)this is mirrored from the transaction newsgroup:
Joseph Weinstein <[email protected]> wrote:
>
>
Interesting, but it's not an isolation level issue. There is no DBMS
isolation level
that could cause a user not to see already-committed data.Well, we are using Oracle as our backend and it supports Read Uncommitted, Read
Committed and Serializable. The Serializable option would prevent a transaction
from seeing any committed data to a table (i.e. prevents unrepeatable reads).
The default isolation level of most DBMSes is READ_COMMITTED, and you
should
never have to change it, and you should be able to see already-committed
data.I agree, but that is not happening for us (and this gets somewhat complicated
with JMS). What is Weblogic 8.1's default isolation level for any transaction.
From the link below, I get the impression it is SERIALIZABLE which would explain
the behaviour I'm seeing. Athough the article seems to be talking about CMT (container
transation), I would suspect a BMT (bean managed transaction) be similar (just
manual).
If this only confuses things, please let me know the easiest way to communicate
this issue (code, etc..)
http://newsgroups.bea.com/cgi-bin/dnewsweb?cmd=article&group=weblogic.developer.interest.transaction&item=227&utag
(from the article)
Subject: Re: What is ths default transaction isolation level
Date: Mon, 12 Feb 2001 15:27:24 -0500
From: "Cameron Purdy" <[email protected]>
Organization: BEA SYSTEMS Inc
Newsgroup: weblogic.developer.interest.transaction
serializable
-- Cameron Purdy Tangosol, Inc. http://www.tangosol.com +1.617.623.5782 WebLogic
Consulting Available
"mrityunjay" <[email protected]> wrote in message news:3a86c781$[email protected]..
Hi , > If transaction isolation , for a EJB is not specified what is the > defaulttransaction isolation level > Thanks > Jay > > -
Transaction Isolation Level to Read UnCommited in Non OLTP Database
HI,
We are having a database which for NOT OLTP process. That is OLAP DB. Operation on that DB is only Select and (Incremental Insert - FOR DWH ) not Update/Delete and we are performing ROLAP operations in that DB.
By Default SQL Server DB isolation Level is READ COMMITTED.AS Our DB IS OLAP SQL Server DB we need to change the isolation level toRead Uncommited. We google it down but We can achive in
Transaction level only by SET isoaltion Level TO Read UNCOMMITED
or ALLOW_SNAPSHOT_ISOLATION ON or READ_COMMITTED_SNAPSHOT
Is there any other way if we can Change the Database isolation level to READ uncommitedfor Entire Database?, insteads of achiving in Transaction Level or With out enabling SET ALLOW_SNAPSHOT_ISOLATION ON or READ_COMMITTED_SNAPSHOT
Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.
Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.Hi,
My first question would be why do you want to change Isolation level to read uncommitted, are you aware about the repercussions you will get dirty data, a wrong data.
Isolation level is basically associated with the connection so is define in connection.
>> Transaction level only by SET isoaltion Level TO Read UNCOMMITED or ALLOW_SNAPSHOT_ISOLATION ON or READ_COMMITTED_SNAPSHOT
Be cautious Read UNCOMMITED and Snapshot isolation level are not same.The former is pessimistic Isolation level and later is Optimistic.Snapshot isolation levels are totally different from read uncommitted as snapshot Isolation level
uses row versioning.I guess you wont require snapshot isolation level in O:AP DB.
Please read below blog about setting Isolation level Server wide
http://blogs.msdn.com/b/ialonso/archive/2012/11/26/how-to-set-the-default-transaction-isolation-level-server-wide.aspx
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers
My TechNet Wiki Articles -
Issues with transaction isolation levels (BEA-631 exceptions)
My intended EJB application will have a session bean that uses two very similar entity beans that will be mapped to different databases; in my test version the entity beans use the same database.
The final application will need XA transactions with isolation=serializable (beans may be in Oracle, DB2, or MSSQL databases); high probability of concurrent potentially interfering transactions.
My test example works (Windows XP, WebLogic 8.1, Oracle 9.2) with both BEA's Oracle driver, and the Oracle driver but only when I set a transaction isolation on the session bean as the Oracle specific "transactionreadcommitedforupdate".
If I try using "transactionserializable", I get an exception like the following when my session-bean first tries to find an entity bean:
<2/09/2005 10:13:43 AM EST> <Warning> <Common> <BEA-000631> <Unknown resource "weblogic.jdbc.common.internal.ConnectionEnv@1f13e99" being released to pool "BEAOraclePool". Printing out current pool contents.>
(similar response with both drivers).
Please could someone explain what is wrong and why setting isolation serializable causes problems. How
should I fix things?Hi. What version of 8.1 is this?
If you can easily reproduce this
we may either have a fix, or will
want to debug this.
Joe
Neil Gray wrote:
The bit about "cleaning up vendor connections" was from the comment by Imeshev that was earlier in this thread.
The context:
Application does involve possibility of two concurrent transactions trying to change the same row of a datatable; as isolation level is repeatableread or serializable, this will result in some exceptions. Sometimes exceptions handled ok, sometimes they cause problems.
Particular case illustrated below is when working with DB2. As I understand it, the two concurrent EJBs both make read requests (presumably acquiring read locks) then make update requests - if they happen to share a row this will block. I don't know enough about DB2 to know what controls its detection of problems. In practice I see db2 typically sending back an error to one of requestors in less than 1 second, but sometimes several seconds may elapse before the error response gets sent (I have observ
ed actual net traffic).
If transaction gets timed out in WebLogic (I've curently got a generous 8 second timeout setting in JTA tab) then there are problems.
First of two exceptions shown here is for normal case where db2 returned an error and it was handled ok:
11111111111111111
####<30/09/2005 10:55:39 AM EST> <Error> <EJB> <ATP-NL2-RS3> <examplesServer> <ExecuteThread: '12' for queue: 'weblogic.kernel.Default'> <<anonymous>> <> <BEA-010026> <Exception occurred during commit of transaction Name=[EJB db2transferapp.TransferBean.doTransfer(java.lang.String,java.lang.String,java.math.BigDecimal)],Xid=BEA1-1D5B56A9177C58E3D95B(17477508),Status=Rolled back. [Reason=weblogic.utils.NestedRuntimeException: Error writing from beforeCompletion - with nested exception:
[weblogic.jdbc.base.BaseBatchUpdateException: [BEA][DB2 JDBC Driver]Abnormal end unit of work condition occurred.]],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=10,XAServerResourceInfo[BEADB2]=(ServerResourceInfo[BEADB2]=(state=rolledback,assigned=examplesServer),xar=BEADB2,re-Registered = false),SCInfo[examples+examplesServer]=(state=rolledback),properties=({weblogic.transaction.name=[EJB db2transferapp.TransferBean.doTransfer(java.lang.String,java.lang.String,java.math.Bi
gDecimal)], ISOLATION LEVEL=4}),local properties=({modifiedListeners=[weblogic.ejb20.internal.TxManager$TxListener@eed1b8]}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=examplesServer+203.143.168.208:7001+examples+t3+, XAResources={},NonXAResources={})],CoordinatorURL=examplesServer+203.143.168.208:7001+examples+t3+): weblogic.jdbc.base.BaseBatchUpdateException: [BEA][DB2 JDBC Driver]Abnormal end unit of work condition occurred.
at weblogic.jdbc.db2.DB2ImplStatement.executeBatch(Unknown Source)
at weblogic.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
--------------- nested within: ------------------
weblogic.utils.NestedRuntimeException: Error writing from beforeCompletion - with nested exception:
[weblogic.jdbc.base.BaseBatchUpdateException: [BEA][DB2 JDBC Driver]Abnormal end unit of work condition occurred.]
at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManager.java:673)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion: sync=weblogic.ejb20.internal.TxManager$TxListener@eed1b8
Error writing from beforeCompletion - with nested exception:
[weblogic.utils.NestedRuntimeException: Error writing from beforeCompletion - with nested exception:
[weblogic.jdbc.base.BaseBatchUpdateException: [BEA][DB2 JDBC Driver]Abnormal end unit of work condition occurred.]]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1683)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
.>
222222222222222
Second case is where timeout in WebLogic occurred (I think) which leads to something messing up the connection pool
####<30/09/2005 10:56:24 AM EST> <Warning> <Common> <ATP-NL2-RS3> <examplesServer> <ExecuteThread: '12' for queue: 'weblogic.kernel.Default'> <<anonymous>> <BEA1-22BE56A9177C58E3D95B> <BEA-000631> <Unknown resource "weblogic.jdbc.common.internal.ConnectionEnv@1551d57" being released to pool "BEADB2". Printing out current pool contents.>
####<30/09/2005 10:56:24 AM EST> <Warning> <Common> <ATP-NL2-RS3> <examplesServer> <ExecuteThread: '12' for queue: 'weblogic.kernel.Default'> <<anonymous>> <> <BEA-000631> <Unknown resource "weblogic.jdbc.common.internal.ConnectionEnv@1551d57" being released to pool "BEADB2". Printing out current pool contents.>
####<30/09/2005 10:56:24 AM EST> <Warning> <Common> <ATP-NL2-RS3> <examplesServer> <ExecuteThread: '12' for queue: 'weblogic.kernel.Default'> <<anonymous>> <> <BEA-000631> <Unknown resource "weblogic.jdbc.common.internal.ConnectionEnv@f95d4a" being released to pool "BEADB2". Printing out current pool contents.>
####<30/09/2005 10:56:24 AM EST> <Error> <EJB> <ATP-NL2-RS3> <examplesServer> <ExecuteThread: '14' for queue: 'weblogic.kernel.Default'> <<anonymous>> <> <BEA-010026> <Exception occurred during commit of transaction Name=[EJB db2transferapp.TransferBean.doTransfer(java.lang.String,java.lang.String,java.math.BigDecimal)],Xid=BEA1-22BD56A9177C58E3D95B(18185360),Status=Rolled back. [Reason=weblogic.transaction.internal.TimedOutException: Transaction timed out after 8 seconds
Name=[EJB db2transferapp.TransferBean.doTransfer(java.lang.String,java.lang.String,java.math.BigDecimal)],Xid=BEA1-22BD56A9177C58E3D95B(18185360),Status=Active (PrePreparing),numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=8,seconds left=10,activeThread=Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],XAServerResourceInfo[BEADB2]=(ServerResourceInfo[BEADB2]=(state=started,assigned=none),xar=BEADB2,re-Registered = false),SCIn
fo[examples+examplesServer]=(state=pre-preparing),properties=({weblogic.transaction.name=[EJB db2transferapp.TransferBean.doTransfer(java.lang.String,java.lang.String,java.math.BigDecimal)], ISOLATION LEVEL=4}),local properties=({modifiedListeners=[weblogic.ejb20.internal.TxManager$TxListener@1f2a681], weblogic.jdbc.jta.BEADB2=weblogic.jdbc.wrapper.TxInfo@1a4ef37}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=examplesServer+203.143.168.208:7001+examples+t3+, XAResources={},
NonXAResources={})],CoordinatorURL=examplesServer+203.143.168.208:7001+examples+t3+)],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=9,seconds left=9,XAServerResourceInfo[BEADB2]=(ServerResourceInfo[BEADB2]=(state=rolledback,assigned=examplesServer),xar=BEADB2,re-Registered = false),SCInfo[examples+examplesServer]=(state=rolledback),properties=({weblogic.transaction.name=[EJB db2transferapp.TransferBean.doTransfer(java.lang.String,java.lang.String,java.math.BigDecimal)], ISOLATION LEVEL=4})
,local properties=({modifiedListeners=[]}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=examplesServer+203.143.168.208:7001+examples+t3+, XAResources={},NonXAResources={})],CoordinatorURL=examplesServer+203.143.168.208:7001+examples+t3+): weblogic.transaction.internal.TimedOutException: Transaction timed out after 8 seconds
Name=[EJB db2transferapp.TransferBean.doTransfer(java.lang.String,java.lang.String,java.math.BigDecimal)],Xid=BEA1-22BD56A9177C58E3D95B(18185360),Status=Active (PrePreparing),numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=8,seconds left=10,activeThread=Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],XAServerResourceInfo[BEADB2]=(ServerResourceInfo[BEADB2]=(state=started,assigned=none),xar=BEADB2,re-Registered = false),SCIn
fo[examples+examplesServer]=(state=pre-preparing),properties=({weblogic.transaction.name=[EJB db2transferapp.TransferBean.doTransfer(java.lang.String,java.lang.String,java.math.BigDecimal)], ISOLATION LEVEL=4}),local properties=({modifiedListeners=[weblogic.ejb20.internal.TxManager$TxListener@1f2a681], weblogic.jdbc.jta.BEADB2=weblogic.jdbc.wrapper.TxInfo@1a4ef37}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=examplesServer+203.143.168.208:7001+examples+t3+, XAResources={},
NonXAResources={})],CoordinatorURL=examplesServer+203.143.168.208:7001+examples+t3+)
at weblogic.transaction.internal.ServerTransactionImpl.wakeUp(ServerTransactionImpl.java:1614)
at weblogic.transaction.internal.ServerTransactionManagerImpl.processTimedOutTransactions(ServerTransactionManagerImpl.java:1117)
at weblogic.transaction.internal.TransactionManagerImpl.wakeUp(TransactionManagerImpl.java:1881)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
--------------- nested within: ------------------
weblogic.transaction.RollbackException: Transaction timed out after 8 seconds
Name=[EJB db2transferapp.TransferBean.doTransfer(java.lang.String,java.lang.String,java.math.BigDecimal)],Xid=BEA1-22BD56A9177C58E3D95B(18185360),Status=Active (PrePreparing),numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=8,seconds left=10,activeThread=Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],XAServerResourceInfo[BEADB2]=(ServerResourceInfo[BEADB2]=(state=started,assigned=none),xar=BEADB2,re-Registered = false),SCIn
fo[examples+examplesServer]=(state=pre-preparing),properties=({weblogic.transaction.name=[EJB db2transferapp.TransferBean.doTransfer(java.lang.String,java.lang.String,java.math.BigDecimal)], ISOLATION LEVEL=4}),local properties=({modifiedListeners=[weblogic.ejb20.internal.TxManager$TxListener@1f2a681], weblogic.jdbc.jta.BEADB2=weblogic.jdbc.wrapper.TxInfo@1a4ef37}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=examplesServer+203.143.168.208:7001+examples+t3+, XAResources={},
NonXAResources={})],CoordinatorURL=examplesServer+203.143.168.208:7001+examples+t3+) - with nested exception:
[weblogic.transaction.internal.TimedOutException: Transaction timed out after 8 seconds
Name=[EJB db2transferapp.TransferBean.doTransfer(java.lang.String,java.lang.String,java.math.BigDecimal)],Xid=BEA1-22BD56A9177C58E3D95B(18185360),Status=Active (PrePreparing),numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=8,seconds left=10,activeThread=Thread[ExecuteThread: '14' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],XAServerResourceInfo[BEADB2]=(ServerResourceInfo[BEADB2]=(state=started,assigned=none),xar=BEADB2,re-Registered = false),SCIn
fo[examples+examplesServer]=(state=pre-preparing),properties=({weblogic.transaction.name=[EJB db2transferapp.TransferBean.doTransfer(java.lang.String,java.lang.String,java.math.BigDecimal)], ISOLATION LEVEL=4}),local properties=({modifiedListeners=[weblogic.ejb20.internal.TxManager$TxListener@1f2a681], weblogic.jdbc.jta.BEADB2=weblogic.jdbc.wrapper.TxInfo@1a4ef37}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=examplesServer+203.143.168.208:7001+examples+t3+, XAResources={},
NonXAResources={})],CoordinatorURL=examplesServer+203.143.168.208:7001+examples+t3+)]
at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1683)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:325)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
.>
Once start getting those things released to pool the application falls apart. Shortly afterwards it loses all connections to DB2 (and DB2 may be left with some locks on the table that have to be cleared).
It isn't DB2 specific, if needed I can supply similar data for MSSQL server (BEA or MS drivers) -
About Transaction Isolation Levels...
Hi Everyone,
Please, i have a couple of questions regarding the Transaction Isolation Level, i will really appreciate any help on this...
1.- It is possible to know the transaction isolation level of all connections to the DB.??.. something like a select from v$session...
2.- I have an application that manage it's own connection pool and have set all of its connections to Transaction_read_commited. The problem is that for some reason, sometimes we get the "ORA-08177: can't serialize access for this transaction." Error. But what i know is that this ORA-08177 error only happens if the transaction isolation level is set to TRANSACTION_SERIALIZABLE. How can be that possible??. There is another application running that points to the same database that maybe uses TRANSACTION_SERIALIZABLE connections but even if this is happening, why the error is happening with my application!!?. Both applications are running on the same weblogic application server with oracle thin jdbc driver... (Oracle 9i)
Thanks in advance...
Victor.thanks for the answers guys... i was reding several articles by Tom and also looking into Metalink documents... but my concern or my million dollar question is still: if exists the possibility to get the ORA-8177 error, even if i'm using Transaction isolation level READ_COMMITED???... what i learned from this articles is that if i use the Transaction SERIALIZABLE i may have this ORA-8177.. otherwise i wouldn't. right?... and if exists bugs related all that bugs may exists only if i define my connection as TRANSACTION_SERIALIZABLE.
I'm pretty sure that in my application ("Application A") i'm not using any TRANSACTION_SERIALIZABLE connections.... but i'm afraid that the other application ("Application B") is causing some blocks or conflicts with "Application A"... Is that possible?? (i think that in theory it's not)... But still if that's possible.. i return to my question... Why that ORA-8177 error raises on my "Application A".... this kind of error must be raising only in the "application B"....
Well maybe is something confusing.. an maybe is totally related to some developing mistake.... i just wanted to confirm some other point of views....
thanks again!!..
Victor -
Setting transaction isolation levels in WAS5
I think I'm missing something pretty easy. How can I set the isolation
levels for the containter managed transactions on my beans?
Specifically, I want to set soem lookup methods on my Sessions beans
to TRANSACTION_REPEATABLE_READ. I've already put the
container-transaction blocks in my ejb-jar.xml
Does Websphere 5 have something akin to WebLogic's
weblogic-ejb-jar.xml where you can set additional parameters like
this? Do I have to use a tool like WSAD to specify this? The AAT
doesn't seem to have this option.
Thanks,
James LynnHi Slava, Ryan,
We haven't looked at 8.1 yet since our release cycle wouldn't allow us
to move to 8.1 until at least June anyway, but even if the problems was
fixed there it took BEA support more than 6 months (I opened the case on
Sep 23 2002 and only this week I got the patch that I haven't even tried
to test to see if it works) to issue a patch for such a small problem.
The server would just check if the Oracle XA driver was being used and
no matter what version would just throw an exception if you try to set
the transaction isolation level saying that the feature in the Oracle
8.1.7 driver was broken... (although you might be using 9.x or even a
pre-8.1.7 driver)...
So this is about it.
And Slava, I've tried pushing a case harder only to end up with BEA
support trying to convince me that I was misinterpreting the JDBC spec
when it was not true, so I just gave up. The main goal of BEA support in
all of our experience has been that they don't try to solve the cases
but close them.
That's my and some of my colleagues personal views anyway, you don't
have to share them.
Regards,
Dejan
Slava Imeshev wrote:
Hi Deyan,
Sorry for the delay. Could you give us more details about CR090104?
I've got some feedback in XA area, not sure if it was a related case.
Also, I've never had any problems with weblogic CCE, so you may want
to push your case a little harder.
As per the bold statement - the initial question was about functionality
available in weblogic but not available in websphere - it can't be more
bold :)
Regards,
Slava Imeshev
"Deyan D. Bektchiev" <[email protected]> wrote in message
news:[email protected]...
This is a very bold statement Slava, considering that with Oracle XA
driver you cannot even set the transaction isolation level because of a
Weblogic bug (CR090104 that has been open for more than 6 months
already)...
Dejan
Slava Imeshev wrote:
Hi James,
"James F'jord Lynn" <[email protected]> wrote in message
news:[email protected]...
I think I'm missing something pretty easy. How can I set the isolation
levels for the containter managed transactions on my beans?
Specifically, I want to set soem lookup methods on my Sessions beans
to TRANSACTION_REPEATABLE_READ. I've already put the
container-transaction blocks in my ejb-jar.xml
Does Websphere 5 have something akin to WebLogic's
weblogic-ejb-jar.xml where you can set additional parameters like
this? Do I have to use a tool like WSAD to specify this? The AAT
doesn't seem to have this option.
My guess here is that it's a signal that this is a last chance
for you to abandon WebSphere and return back to WebLogic's
safe harbor.
Regards,
Slava Imeshev
Maybe you are looking for
-
Hi, New here, trying to restore my i phone 5 to newly refurbished i phone 5 and couldn't do it w/ wizard. old phone had OS-7 new came with OS-6... wouldn't let me restore from cloud without same operating system. Installed os-7 only option then w
-
Is Apple going to make TVs?
Is Apple going to start making TVs?
-
Company Code Inventory Balances by Trading Partner in Classic GL
Is there a way to display Company Code Inventory Balances by Trading Partner with drilldown by Material Number and Quantity within the Classic Ledger in ECC 6? Please note we do not have SAP Consolidations enabled. Thanks in advance for your respons
-
Impossible to enable master page editing
Hello everyone, I'm in trouble because I have to create a custom Sharepoint 2010 Foundation template and i can't modify the master page of the team site. Now you will tell me to go to Site Collection Administration, then to Sharepoint Designer Settin
-
Muvo TX SE 1gb squeaks between tra
hey, just bought the gb Muvo TX SE player. Everythings ok but it makes squeaking noises between tracks. Not sure if its cause I installed the firmware straight away. Anyone have this problem, can it be fixed or is defecti've? cheers