Hi,
I have written a junit-test to test the primary key generation ?
My OJB-version : 0.9.5
My database : mssqlserver
Scenario :
1) start transaction
2) delete some objects from table category
3) insert new objects in table category
4) commit
When I try to run this scenario, the program HANGS on step 3 when the
following select is executed :
select max(category_nr) from category
After debugging I found that the method getAutoincrementValue()
(ClassDescriptor) is not using the current broker instance !!!!!
So another connection will be used to execute the select !
Is this a bug ?
Is there a way to specify the JDBC transaction isolation level ?
Greetings,
Frank
private Object getAutoIncrementValue(FieldDescriptor fmd, Object obj, Object
cv)
{
if ((cv == null) || ((cv instanceof Number) && (((Number)
cv).intValue() == 0)))
{
PersistentField f = fmd.getPersistentField();
Object result = cv;
PersistenceBroker broker = null;
try
{
broker =
PersistenceBrokerFactory.defaultPersistenceBroker();
// int
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>