You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-user@db.apache.org by Andreas Bohnert <ab...@online.de> on 2004/03/29 16:43:25 UTC

auto-delete does not work anymore: rc6???


hello everbody,

today I checked out the rc6 cvs version and did some validation tests on 
my application.
I found out, that there is something going wrong, when I delete an object.

I have an decomposed n-m relation:

CONTACT --------INSTITUTION_CONTACT ------- INSTITUTION

when I delete an INSTITUTION_CONTACT the related INSTITUTION and the 
CONTACT are deleted as well!!
I have put an auto-delete=false in my metadata, so I don't see a reason 
for that action.

here is the metadata for INSTITUTION_CONTACT :
class-descriptor
 class="at.weberhofer.eusoda.shared.orm.Institution_Contact"
 table="institution_contact"
>
 <field-descriptor id="0"
   name="institutionContactId"
   column="institution_contact_id"
   jdbc-type="INTEGER"
   primarykey="true"
   autoincrement="true"
 />
 <field-descriptor id="1"
   name="contactId"
   column="contact_id"
   jdbc-type="INTEGER"
 />
 <field-descriptor id="2"
   name="institutionId"
   column="institution_id"
   jdbc-type="INTEGER"
 />
 <field-descriptor id="3"
   name="isPublic"
   column="isPublic"
   jdbc-type="TINYINT"
 />
 <field-descriptor id="4"
   name="contactPrivileges"
   column="contactPrivileges"
   jdbc-type="INTEGER"
 />
 <field-descriptor id="5"
   name="sortHelp"
   column="sortHelp"
   jdbc-type="INTEGER"
 />
 <field-descriptor id="6"
   name="updateTime"
   column="updateTime"
   jdbc-type="TIMESTAMP"
 />

   <reference-descriptor
    name="contact"
    auto-retrieve="true"
    auto-update="true"
    auto-delete="false"
    class-ref="at.weberhofer.eusoda.shared.orm.Contact"
 >
    <foreignkey field-ref="contactId"/>
 </reference-descriptor>

   <reference-descriptor
    name="institution"
    auto-retrieve="true"
    auto-update="true"
    auto-delete="false"
    class-ref="at.weberhofer.eusoda.shared.orm.Institution"
 >
    <foreignkey field-ref="institutionId"/>
 </reference-descriptor>


</class-descriptor>





---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Guido Beutler <gu...@hrs.de>.
Armin Waibel wrote:

> Guido Beutler wrote:
>
>> Hi,
>>
>> changing
>>
>>   public boolean representsNull(FieldDescriptor fld, Object aValue)
>>   {
>>    .....
>>       if(((aValue instanceof Number) && (((Number) 
>> aValue).longValue() == 0)))
>>       {
>>  >>>           result = 
>> fld.getPersistentField().getType().isPrimitive() && fld.isPrimaryKey();
>>       }
>>     ....
>>       return result;
>>   }
>>
>> into
>>
>> result = fld.getPersistentField().getType().isPrimitive() && ! 
>> fld.isPrimaryKey();
>>                                              seems to fix my problem, 
>> updates are generated now and insert's work too.
>> One of our OJB Guru's like Armin should take a look on it. ;-)
>> I just made some small tests and can not be sure that this don't 
>> produce some side effects.
>> If my fix is correct, updates never worked for objects with 0 values 
>> at primary key fields.
>>
>
> Maybe I'm on the wrong tack, but I don't figure out the change. This 
> method should return 'true'
> - when the field as number of '0'
> - and the field is primitive (short in your case)
> - and the field-descriptor is declared as PK

Yes and I think the second is not correct. 0 at primary key's, 
especially if the column is only one of a set of pk columns,
is a legal value, maybe that I'm wrong of course. I like using primitive 
fields at my data classes, because they are fast,
small and I can avoid converting everything from int to Integer and back 
again. Of course this is only one (my) opinion.

>
> In your patch you return true, when the field was not declared as PK. 
> But in that case all values are valid ('0' too). Your patch do the 
> opposite from what I expected. Maybe I'm completely confused ;-)

You're right, this is nonsens. :-)
Throwing away the rule would work for me too.

>
> Again, if you have a class with primitive short field, declared as PK 
> with value '0', OJB assume that the field is nullified and because PK 
> couldn't be 'null' OJB assume the given object was new.

At repository_user.xml I can define attributes like:

  <field-descriptor id="1"
     name="col"
     column="col"
     jdbc-type="INTEGER"
     
conversion="org.apache.ojb.broker.accesslayer.conversions.Int2IntegerFieldConversion" 

  />

I thought, this is legal for PK fields too. Am I wrong with that?
The behavior to handle int 0 values as null values is new in RC6. In RC5 
OJB stored a 0 if no additional conversion was defined.
I thought that the additional conversion was build to handle exact this 
behavior.
In relational databases 0 is a legal pk value too and may exist in many 
databases. Why restrict this when using OJB ?

Edson is right with his suggestion, that testing for auto-increment 
would solve my problem too,
but I still don't understand why it is necessary to test for 0 in 
primitive types. If I define a primitive type and don't
add a special conversion I documented at the repository that I know that 
0 is treated as 0 (like in RC5 ).
Maybe that I documented that this is a bad mapping too :-)
I thought using primitive types means that you can never write a null 
value. In my current application I can live with that
and prefer to use the performance improvement of primitives. In other 
applications other mappings are better.

best regards,

Guido

> Hope I don't make a fool of oneself ;-)
>
> regards,
> Armin
>
>> best regards,
>>
>> Guido
>>
>>
>> Guido Beutler wrote:
>>
>>> Guido Beutler wrote:
>>>
>>>> Armin Waibel wrote:
>>>>
>>>>> do you use anonymous keys? If so where?
>>>>>
>>>>> >> Do you remember our DataSource problem with 3.2.2.RC3 with missing
>>>>> >> results?
>>>>>
>>>>> No, can you describe this problem again? Should I update to JBoss 
>>>>> 3.2.3 and run the tests again?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> we had the problem, that not all objects were returned by OJB. This 
>>>> seemed to be a side effect of the eager-release
>>>> flag. After Update to JBoss 3.2.3 the problem disapeared. Maybe 
>>>> that the bahavior of our current problem is different
>>>> in 3.2.3.
>>>> I'll put some debug gcode into PersistenceBroker and see what's 
>>>> going on during insert/update.
>>>>
>>>> best regards,
>>>>
>>>> Guido
>>>
>>>
>>>
>>>
>>> Hi,
>>>
>>> I added some debug code to
>>>
>>> PersistenceBrokerImpl :
>>>
>>>    public void store(Object obj) throws PersistenceBrokerException
>>>    {
>>>
>>> ...
>>>
>>>            boolean doInsert = 
>>> serviceBrokerHelper().hasNullPKField(cld, obj);
>>>
>>> returns true. The reason seems to be BrokerHelper.representsNull :
>>>
>>>    public boolean representsNull(FieldDescriptor fld, Object aValue)
>>>    {
>>>     .....
>>>        if(((aValue instanceof Number) && (((Number) 
>>> aValue).longValue() == 0)))
>>>        {
>>>            result = fld.getPersistentField().getType().isPrimitive() 
>>> && fld.isPrimaryKey();
>>>        }
>>>      ....
>>>        return result;
>>>    }
>>>
>>> returns true for my SMALLINT objects if the value is 0. But 0 is a 
>>> leagal value for SMALLINT PK attributes.
>>> After that PersistenceBrokerImpl.store checks the cache:
>>>
>>>            /*
>>>            if PK values are set, lookup cache or db to see whether 
>>> object
>>>            needs insert or update
>>>            */
>>>            if (!doInsert)
>>>            {
>>>                doInsert = objectCache.lookup(oid) == null
>>>                    && !serviceBrokerHelper().doesExist(cld, oid, obj);
>>>            }
>>>
>>> because of doInsert is still true (I checked it) The cache is never 
>>> checked for the object. doInsert is still true and
>>> a few lines later
>>>
>>>            // now store it:
>>>            store(obj, oid, cld, doInsert);
>>>
>>> generates the insert statement. Maybe I'm wrong but for me it looks 
>>> like a 0 (not null) at any PK field causes a insert statement.
>>> In my case it is immediately the first object. Is it a good idea to 
>>> check the cache independent if doInsert is true or is the 
>>> implementation
>>> of  representsNull the cause and should be changed ?
>>>
>>> best regards,
>>>
>>> Guido
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Edson Carlos Ericksson Richter <ed...@mgrinformatica.com.br>.
I agree with you. Conversion is one way to get things working, as OJB 
executing a select to test with already exists a record with PK 0 is 
another way.
The auto-increment field should be tested when in PK that is inherently 
not-null. In this case, there is no other way (exception if we create a 
nullable attribute for field-descriptors).

About the 0 in multi-pk fields, I agree. My comments look about single 
PK fields.

I'm just trying to get a new point of view in the discussion, because I 
use largelly int in PK, and changes in this behaviour can affect our 
projects (fortunatelly, since we never use 0 as valid value for PKs, we 
had no problems like reported by you)...

My propose is not change current behaviour, but add non-invasive options 
to manipulate behaviour of OJB.

May be docs should point the developer to use the conversion when he 
want's the mapping from 0 to null, and make OJB doens't making this 
conversion automatically, BUT in case of auto-increment fields I don't 
see much scape. A declared int field will be 0 even if the value is not 
set... So how can I inform OJB that this is a new field? Should we take 
in count that this is a multi-pk, 0 is not converted? Maybe the simple 
to understand, an less intrusive make OJB:

a) don't convert automatically 0 to null;
b) when auto-increment is set, consider 0 as new auto-calculated value.
c) convert 0 to null and vice-versa when using int2IntegerConversion.


Best regards,

Edson Richter


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Guido Beutler <gu...@hrs.de>.
Hi,

Edson Carlos Ericksson Richter wrote:

> Let me make some comments:
>
> Using primitive, then there is no other way to specify a nullability. 
> I think we can take to the developer a choice to use nullable and 
> primitive int but keep it always warned that 0 will save NULL in the 
> database, and a NULL in database will, in turn, be converted to a 0 in 
> primitive field. I think a WARN in docs is sufficient.

At repository_user.xml I can define attributes like:

   <field-descriptor id="1"
      name="col"
      column="col"
      jdbc-type="INTEGER"
      
conversion="org.apache.ojb.broker.accesslayer.conversions.Int2IntegerFieldConversion"
   />

I think this is the correct way to tell OJB if 0 should represent null 
or not. The behavior to handle int 0 values as null values
is new in RC6. In RC5 OJB stored a 0 if no aditional conversion was defined.

>
> Maybe a future "nullable" attribute in field-descritor could help, 
> with values "zeroIsNull", "negativeIsNull", "false", "true" (where 
> false means default action: 0 == 0, -1 == -1, and true means actual 
> behaviour 0==null. The other options talk by itself).
>
I think the conversion always solves the problem but of course this 
would work too.

> But in PK, that doesn't allow NULL, if the primitive field is 0 we can 
> have two situations: if the mapping tell us that there is an 
> auto-increment field, then user doesn't want a real 0, but a newly 
> inserted field. Auto-increments, as far as I have seen don't use 0 as 
> starting point.
>
I think using autoincrement isn't as clear as a nullable attribute or 
conversion.

> <comment type="maybe_offtopic">As interesting history, some weeks ago 
> a beginner developer asked me about a product type codes: 0 - Service, 
> 1 - Resale product, 2 - Own factoried product. I said to him: never, 
> ever, use 0 as PK to avoid problems for understanding. In meantime, 
> another begginer at his side said "0, in my point of view, is expected 
> to means nothing, so I'll never use it as value for a PK". I'm tending 
> to agree with this vision.</comment>

If the table has only one pk field I would agree with that but there may 
be tables with several pk fields. I don't think that defining
don't use 0 in pk fields is a general rule for those tables.

>
> So, OJB could test if the field is auto-increment, and, if true, then 
> assume that it's a new record being inserted. If false, assume that 
> it's a 0 since there is no NULLs in PKs, and should be a update if 
> already exists. This change, as far as I can see, will not change the 
> current behaviour of OJB, right?

Would work, but I still don't understand why not using conversion.

best regards,

Guido

>
> Just my 2 cents,
>
> Edson Richter
>
>
> Armin Waibel wrote:
>
>> Guido Beutler wrote:
>>
>>> Hi,
>>>
>>> changing
>>>
>>>   public boolean representsNull(FieldDescriptor fld, Object aValue)
>>>   {
>>>    .....
>>>       if(((aValue instanceof Number) && (((Number) 
>>> aValue).longValue() == 0)))
>>>       {
>>>  >>>           result = 
>>> fld.getPersistentField().getType().isPrimitive() && fld.isPrimaryKey();
>>>       }
>>>     ....
>>>       return result;
>>>   }
>>>
>>> into
>>>
>>> result = fld.getPersistentField().getType().isPrimitive() && ! 
>>> fld.isPrimaryKey();
>>>                                              seems to fix my 
>>> problem, updates are generated now and insert's work too.
>>> One of our OJB Guru's like Armin should take a look on it. ;-)
>>> I just made some small tests and can not be sure that this don't 
>>> produce some side effects.
>>> If my fix is correct, updates never worked for objects with 0 values 
>>> at primary key fields.
>>>
>>
>> Maybe I'm on the wrong tack, but I don't figure out the change. This 
>> method should return 'true'
>> - when the field as number of '0'
>> - and the field is primitive (short in your case)
>> - and the field-descriptor is declared as PK
>>
>> In your patch you return true, when the field was not declared as PK. 
>> But in that case all values are valid ('0' too). Your patch do the 
>> opposite from what I expected. Maybe I'm completely confused ;-)
>>
>> Again, if you have a class with primitive short field, declared as PK 
>> with value '0', OJB assume that the field is nullified and because PK 
>> couldn't be 'null' OJB assume the given object was new.
>> Hope I don't make a fool of oneself ;-)
>>
>> regards,
>> Armin
>>
>>> best regards,
>>>
>>> Guido
>>>
>>>
>>> Guido Beutler wrote:
>>>
>>>> Guido Beutler wrote:
>>>>
>>>>> Armin Waibel wrote:
>>>>>
>>>>>> do you use anonymous keys? If so where?
>>>>>>
>>>>>> >> Do you remember our DataSource problem with 3.2.2.RC3 with 
>>>>>> missing
>>>>>> >> results?
>>>>>>
>>>>>> No, can you describe this problem again? Should I update to JBoss 
>>>>>> 3.2.3 and run the tests again?
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> we had the problem, that not all objects were returned by OJB. 
>>>>> This seemed to be a side effect of the eager-release
>>>>> flag. After Update to JBoss 3.2.3 the problem disapeared. Maybe 
>>>>> that the bahavior of our current problem is different
>>>>> in 3.2.3.
>>>>> I'll put some debug gcode into PersistenceBroker and see what's 
>>>>> going on during insert/update.
>>>>>
>>>>> best regards,
>>>>>
>>>>> Guido
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>> I added some debug code to
>>>>
>>>> PersistenceBrokerImpl :
>>>>
>>>>    public void store(Object obj) throws PersistenceBrokerException
>>>>    {
>>>>
>>>> ...
>>>>
>>>>            boolean doInsert = 
>>>> serviceBrokerHelper().hasNullPKField(cld, obj);
>>>>
>>>> returns true. The reason seems to be BrokerHelper.representsNull :
>>>>
>>>>    public boolean representsNull(FieldDescriptor fld, Object aValue)
>>>>    {
>>>>     .....
>>>>        if(((aValue instanceof Number) && (((Number) 
>>>> aValue).longValue() == 0)))
>>>>        {
>>>>            result = 
>>>> fld.getPersistentField().getType().isPrimitive() && 
>>>> fld.isPrimaryKey();
>>>>        }
>>>>      ....
>>>>        return result;
>>>>    }
>>>>
>>>> returns true for my SMALLINT objects if the value is 0. But 0 is a 
>>>> leagal value for SMALLINT PK attributes.
>>>> After that PersistenceBrokerImpl.store checks the cache:
>>>>
>>>>            /*
>>>>            if PK values are set, lookup cache or db to see whether 
>>>> object
>>>>            needs insert or update
>>>>            */
>>>>            if (!doInsert)
>>>>            {
>>>>                doInsert = objectCache.lookup(oid) == null
>>>>                    && !serviceBrokerHelper().doesExist(cld, oid, obj);
>>>>            }
>>>>
>>>> because of doInsert is still true (I checked it) The cache is never 
>>>> checked for the object. doInsert is still true and
>>>> a few lines later
>>>>
>>>>            // now store it:
>>>>            store(obj, oid, cld, doInsert);
>>>>
>>>> generates the insert statement. Maybe I'm wrong but for me it looks 
>>>> like a 0 (not null) at any PK field causes a insert statement.
>>>> In my case it is immediately the first object. Is it a good idea to 
>>>> check the cache independent if doInsert is true or is the 
>>>> implementation
>>>> of  representsNull the cause and should be changed ?
>>>>
>>>> best regards,
>>>>
>>>> Guido
>>>>
>>>>
>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Edson Carlos Ericksson Richter <ed...@mgrinformatica.com.br>.
Let me make some comments:

Using primitive, then there is no other way to specify a nullability. I 
think we can take to the developer a choice to use nullable and 
primitive int but keep it always warned that 0 will save NULL in the 
database, and a NULL in database will, in turn, be converted to a 0 in 
primitive field. I think a WARN in docs is sufficient.

Maybe a future "nullable" attribute in field-descritor could help, with 
values "zeroIsNull", "negativeIsNull", "false", "true" (where false 
means default action: 0 == 0, -1 == -1, and true means actual behaviour 
0==null. The other options talk by itself).

But in PK, that doesn't allow NULL, if the primitive field is 0 we can 
have two situations: if the mapping tell us that there is an 
auto-increment field, then user doesn't want a real 0, but a newly 
inserted field. Auto-increments, as far as I have seen don't use 0 as 
starting point.

<comment type="maybe_offtopic">As interesting history, some weeks ago a 
beginner developer asked me about a product type codes: 0 - Service, 1 - 
Resale product, 2 - Own factoried product. I said to him: never, ever, 
use 0 as PK to avoid problems for understanding. In meantime, another 
begginer at his side said "0, in my point of view, is expected to means 
nothing, so I'll never use it as value for a PK". I'm tending to agree 
with this vision.</comment>

So, OJB could test if the field is auto-increment, and, if true, then 
assume that it's a new record being inserted. If false, assume that it's 
a 0 since there is no NULLs in PKs, and should be a update if already 
exists. This change, as far as I can see, will not change the current 
behaviour of OJB, right?

Just my 2 cents,

Edson Richter


Armin Waibel wrote:

> Guido Beutler wrote:
>
>> Hi,
>>
>> changing
>>
>>   public boolean representsNull(FieldDescriptor fld, Object aValue)
>>   {
>>    .....
>>       if(((aValue instanceof Number) && (((Number) 
>> aValue).longValue() == 0)))
>>       {
>>  >>>           result = 
>> fld.getPersistentField().getType().isPrimitive() && fld.isPrimaryKey();
>>       }
>>     ....
>>       return result;
>>   }
>>
>> into
>>
>> result = fld.getPersistentField().getType().isPrimitive() && ! 
>> fld.isPrimaryKey();
>>                                              seems to fix my problem, 
>> updates are generated now and insert's work too.
>> One of our OJB Guru's like Armin should take a look on it. ;-)
>> I just made some small tests and can not be sure that this don't 
>> produce some side effects.
>> If my fix is correct, updates never worked for objects with 0 values 
>> at primary key fields.
>>
>
> Maybe I'm on the wrong tack, but I don't figure out the change. This 
> method should return 'true'
> - when the field as number of '0'
> - and the field is primitive (short in your case)
> - and the field-descriptor is declared as PK
>
> In your patch you return true, when the field was not declared as PK. 
> But in that case all values are valid ('0' too). Your patch do the 
> opposite from what I expected. Maybe I'm completely confused ;-)
>
> Again, if you have a class with primitive short field, declared as PK 
> with value '0', OJB assume that the field is nullified and because PK 
> couldn't be 'null' OJB assume the given object was new.
> Hope I don't make a fool of oneself ;-)
>
> regards,
> Armin
>
>> best regards,
>>
>> Guido
>>
>>
>> Guido Beutler wrote:
>>
>>> Guido Beutler wrote:
>>>
>>>> Armin Waibel wrote:
>>>>
>>>>> do you use anonymous keys? If so where?
>>>>>
>>>>> >> Do you remember our DataSource problem with 3.2.2.RC3 with missing
>>>>> >> results?
>>>>>
>>>>> No, can you describe this problem again? Should I update to JBoss 
>>>>> 3.2.3 and run the tests again?
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> we had the problem, that not all objects were returned by OJB. This 
>>>> seemed to be a side effect of the eager-release
>>>> flag. After Update to JBoss 3.2.3 the problem disapeared. Maybe 
>>>> that the bahavior of our current problem is different
>>>> in 3.2.3.
>>>> I'll put some debug gcode into PersistenceBroker and see what's 
>>>> going on during insert/update.
>>>>
>>>> best regards,
>>>>
>>>> Guido
>>>
>>>
>>>
>>>
>>> Hi,
>>>
>>> I added some debug code to
>>>
>>> PersistenceBrokerImpl :
>>>
>>>    public void store(Object obj) throws PersistenceBrokerException
>>>    {
>>>
>>> ...
>>>
>>>            boolean doInsert = 
>>> serviceBrokerHelper().hasNullPKField(cld, obj);
>>>
>>> returns true. The reason seems to be BrokerHelper.representsNull :
>>>
>>>    public boolean representsNull(FieldDescriptor fld, Object aValue)
>>>    {
>>>     .....
>>>        if(((aValue instanceof Number) && (((Number) 
>>> aValue).longValue() == 0)))
>>>        {
>>>            result = fld.getPersistentField().getType().isPrimitive() 
>>> && fld.isPrimaryKey();
>>>        }
>>>      ....
>>>        return result;
>>>    }
>>>
>>> returns true for my SMALLINT objects if the value is 0. But 0 is a 
>>> leagal value for SMALLINT PK attributes.
>>> After that PersistenceBrokerImpl.store checks the cache:
>>>
>>>            /*
>>>            if PK values are set, lookup cache or db to see whether 
>>> object
>>>            needs insert or update
>>>            */
>>>            if (!doInsert)
>>>            {
>>>                doInsert = objectCache.lookup(oid) == null
>>>                    && !serviceBrokerHelper().doesExist(cld, oid, obj);
>>>            }
>>>
>>> because of doInsert is still true (I checked it) The cache is never 
>>> checked for the object. doInsert is still true and
>>> a few lines later
>>>
>>>            // now store it:
>>>            store(obj, oid, cld, doInsert);
>>>
>>> generates the insert statement. Maybe I'm wrong but for me it looks 
>>> like a 0 (not null) at any PK field causes a insert statement.
>>> In my case it is immediately the first object. Is it a good idea to 
>>> check the cache independent if doInsert is true or is the 
>>> implementation
>>> of  representsNull the cause and should be changed ?
>>>
>>> best regards,
>>>
>>> Guido
>>>
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Armin Waibel <ar...@apache.org>.
Guido Beutler wrote:
> Hi,
> 
> changing
> 
>   public boolean representsNull(FieldDescriptor fld, Object aValue)
>   {
>    .....
>       if(((aValue instanceof Number) && (((Number) aValue).longValue() 
> == 0)))
>       {
>  >>>           result = fld.getPersistentField().getType().isPrimitive() 
> && fld.isPrimaryKey();
>       }
>     ....
>       return result;
>   }
> 
> into
> 
> result = fld.getPersistentField().getType().isPrimitive() && ! 
> fld.isPrimaryKey();
>                                              seems to fix my problem, 
> updates are generated now and insert's work too.
> One of our OJB Guru's like Armin should take a look on it. ;-)
> I just made some small tests and can not be sure that this don't produce 
> some side effects.
> If my fix is correct, updates never worked for objects with 0 values at 
> primary key fields.
>

Maybe I'm on the wrong tack, but I don't figure out the change. This 
method should return 'true'
- when the field as number of '0'
- and the field is primitive (short in your case)
- and the field-descriptor is declared as PK

In your patch you return true, when the field was not declared as PK. 
But in that case all values are valid ('0' too). Your patch do the 
opposite from what I expected. Maybe I'm completely confused ;-)

Again, if you have a class with primitive short field, declared as PK 
with value '0', OJB assume that the field is nullified and because PK 
couldn't be 'null' OJB assume the given object was new.
Hope I don't make a fool of oneself ;-)

regards,
Armin

> best regards,
> 
> Guido
> 
> 
> Guido Beutler wrote:
> 
>> Guido Beutler wrote:
>>
>>> Armin Waibel wrote:
>>>
>>>> do you use anonymous keys? If so where?
>>>>
>>>> >> Do you remember our DataSource problem with 3.2.2.RC3 with missing
>>>> >> results?
>>>>
>>>> No, can you describe this problem again? Should I update to JBoss 
>>>> 3.2.3 and run the tests again?
>>>
>>>
>>>
>>>
>>>
>>> we had the problem, that not all objects were returned by OJB. This 
>>> seemed to be a side effect of the eager-release
>>> flag. After Update to JBoss 3.2.3 the problem disapeared. Maybe that 
>>> the bahavior of our current problem is different
>>> in 3.2.3.
>>> I'll put some debug gcode into PersistenceBroker and see what's going 
>>> on during insert/update.
>>>
>>> best regards,
>>>
>>> Guido
>>
>>
>>
>> Hi,
>>
>> I added some debug code to
>>
>> PersistenceBrokerImpl :
>>
>>    public void store(Object obj) throws PersistenceBrokerException
>>    {
>>
>> ...
>>
>>            boolean doInsert = 
>> serviceBrokerHelper().hasNullPKField(cld, obj);
>>
>> returns true. The reason seems to be BrokerHelper.representsNull :
>>
>>    public boolean representsNull(FieldDescriptor fld, Object aValue)
>>    {
>>     .....
>>        if(((aValue instanceof Number) && (((Number) 
>> aValue).longValue() == 0)))
>>        {
>>            result = fld.getPersistentField().getType().isPrimitive() 
>> && fld.isPrimaryKey();
>>        }
>>      ....
>>        return result;
>>    }
>>
>> returns true for my SMALLINT objects if the value is 0. But 0 is a 
>> leagal value for SMALLINT PK attributes.
>> After that PersistenceBrokerImpl.store checks the cache:
>>
>>            /*
>>            if PK values are set, lookup cache or db to see whether object
>>            needs insert or update
>>            */
>>            if (!doInsert)
>>            {
>>                doInsert = objectCache.lookup(oid) == null
>>                    && !serviceBrokerHelper().doesExist(cld, oid, obj);
>>            }
>>
>> because of doInsert is still true (I checked it) The cache is never 
>> checked for the object. doInsert is still true and
>> a few lines later
>>
>>            // now store it:
>>            store(obj, oid, cld, doInsert);
>>
>> generates the insert statement. Maybe I'm wrong but for me it looks 
>> like a 0 (not null) at any PK field causes a insert statement.
>> In my case it is immediately the first object. Is it a good idea to 
>> check the cache independent if doInsert is true or is the implementation
>> of  representsNull the cause and should be changed ?
>>
>> best regards,
>>
>> Guido
>>
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Guido Beutler <gu...@hrs.de>.
Hi,

changing

   public boolean representsNull(FieldDescriptor fld, Object aValue)
   {
    .....
       if(((aValue instanceof Number) && (((Number) aValue).longValue() 
== 0)))
       {
 >>>           result = fld.getPersistentField().getType().isPrimitive() 
&& fld.isPrimaryKey();
       }
     ....
       return result;
   }

into

result = fld.getPersistentField().getType().isPrimitive() && ! 
fld.isPrimaryKey();
                                              
seems to fix my problem, updates are generated now and insert's work too.
One of our OJB Guru's like Armin should take a look on it. ;-)
I just made some small tests and can not be sure that this don't produce 
some side effects.
If my fix is correct, updates never worked for objects with 0 values at 
primary key fields.

best regards,

Guido


Guido Beutler wrote:

> Guido Beutler wrote:
>
>> Armin Waibel wrote:
>>
>>> do you use anonymous keys? If so where?
>>>
>>> >> Do you remember our DataSource problem with 3.2.2.RC3 with missing
>>> >> results?
>>>
>>> No, can you describe this problem again? Should I update to JBoss 
>>> 3.2.3 and run the tests again?
>>
>>
>>
>>
>> we had the problem, that not all objects were returned by OJB. This 
>> seemed to be a side effect of the eager-release
>> flag. After Update to JBoss 3.2.3 the problem disapeared. Maybe that 
>> the bahavior of our current problem is different
>> in 3.2.3.
>> I'll put some debug gcode into PersistenceBroker and see what's going 
>> on during insert/update.
>>
>> best regards,
>>
>> Guido
>
>
> Hi,
>
> I added some debug code to
>
> PersistenceBrokerImpl :
>
>    public void store(Object obj) throws PersistenceBrokerException
>    {
>
> ...
>
>            boolean doInsert = 
> serviceBrokerHelper().hasNullPKField(cld, obj);
>
> returns true. The reason seems to be BrokerHelper.representsNull :
>
>    public boolean representsNull(FieldDescriptor fld, Object aValue)
>    {
>     .....
>        if(((aValue instanceof Number) && (((Number) 
> aValue).longValue() == 0)))
>        {
>            result = fld.getPersistentField().getType().isPrimitive() 
> && fld.isPrimaryKey();
>        }
>      ....
>        return result;
>    }
>
> returns true for my SMALLINT objects if the value is 0. But 0 is a 
> leagal value for SMALLINT PK attributes.
> After that PersistenceBrokerImpl.store checks the cache:
>
>            /*
>            if PK values are set, lookup cache or db to see whether object
>            needs insert or update
>            */
>            if (!doInsert)
>            {
>                doInsert = objectCache.lookup(oid) == null
>                    && !serviceBrokerHelper().doesExist(cld, oid, obj);
>            }
>
> because of doInsert is still true (I checked it) The cache is never 
> checked for the object. doInsert is still true and
> a few lines later
>
>            // now store it:
>            store(obj, oid, cld, doInsert);
>
> generates the insert statement. Maybe I'm wrong but for me it looks 
> like a 0 (not null) at any PK field causes a insert statement.
> In my case it is immediately the first object. Is it a good idea to 
> check the cache independent if doInsert is true or is the implementation
> of  representsNull the cause and should be changed ?
>
> best regards,
>
> Guido
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Armin Waibel <ar...@apache.org>.
Hi,

 > returns true for my SMALLINT objects if the value is 0. But 0 is a
 > leagal value for SMALLINT PK attributes.

Gotcha! Do you have declared the SMALLINT field as primitive field in 
your object and declare this field as PK in class-descriptor? In that 
case OJB assume the field represents 'null' (default value of primitive 
number fields). OJB needs to represent a nullified field for primitive 
fields, we take value '0' to do that job.

regards,
Armin


Guido Beutler wrote:

> Guido Beutler wrote:
> 
>> Armin Waibel wrote:
>>
>>> do you use anonymous keys? If so where?
>>>
>>> >> Do you remember our DataSource problem with 3.2.2.RC3 with missing
>>> >> results?
>>>
>>> No, can you describe this problem again? Should I update to JBoss 
>>> 3.2.3 and run the tests again?
>>
>>
>>
>>
>> we had the problem, that not all objects were returned by OJB. This 
>> seemed to be a side effect of the eager-release
>> flag. After Update to JBoss 3.2.3 the problem disapeared. Maybe that 
>> the bahavior of our current problem is different
>> in 3.2.3.
>> I'll put some debug gcode into PersistenceBroker and see what's going 
>> on during insert/update.
>>
>> best regards,
>>
>> Guido
> 
> 
> Hi,
> 
> I added some debug code to
> 
> PersistenceBrokerImpl :
> 
>    public void store(Object obj) throws PersistenceBrokerException
>    {
> 
> ...
> 
>            boolean doInsert = serviceBrokerHelper().hasNullPKField(cld, 
> obj);
> 
> returns true. The reason seems to be BrokerHelper.representsNull :
> 
>    public boolean representsNull(FieldDescriptor fld, Object aValue)
>    {
>     .....
>        if(((aValue instanceof Number) && (((Number) aValue).longValue() 
> == 0)))
>        {
>            result = fld.getPersistentField().getType().isPrimitive() && 
> fld.isPrimaryKey();
>        }
>      ....
>        return result;
>    }
> 
> returns true for my SMALLINT objects if the value is 0. But 0 is a 
> leagal value for SMALLINT PK attributes.
> After that PersistenceBrokerImpl.store checks the cache:
> 
>            /*
>            if PK values are set, lookup cache or db to see whether object
>            needs insert or update
>            */
>            if (!doInsert)
>            {
>                doInsert = objectCache.lookup(oid) == null
>                    && !serviceBrokerHelper().doesExist(cld, oid, obj);
>            }
> 
> because of doInsert is still true (I checked it) The cache is never 
> checked for the object. doInsert is still true and
> a few lines later
> 
>            // now store it:
>            store(obj, oid, cld, doInsert);
> 
> generates the insert statement. Maybe I'm wrong but for me it looks like 
> a 0 (not null) at any PK field causes a insert statement.
> In my case it is immediately the first object. Is it a good idea to 
> check the cache independent if doInsert is true or is the implementation
> of  representsNull the cause and should be changed ?
> 
> best regards,
> 
> Guido
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Guido Beutler <gu...@hrs.de>.
Guido Beutler wrote:

> Armin Waibel wrote:
>
>> do you use anonymous keys? If so where?
>>
>> >> Do you remember our DataSource problem with 3.2.2.RC3 with missing
>> >> results?
>>
>> No, can you describe this problem again? Should I update to JBoss 
>> 3.2.3 and run the tests again?
>
>
>
> we had the problem, that not all objects were returned by OJB. This 
> seemed to be a side effect of the eager-release
> flag. After Update to JBoss 3.2.3 the problem disapeared. Maybe that 
> the bahavior of our current problem is different
> in 3.2.3.
> I'll put some debug gcode into PersistenceBroker and see what's going 
> on during insert/update.
>
> best regards,
>
> Guido

Hi,

I added some debug code to

PersistenceBrokerImpl :

    public void store(Object obj) throws PersistenceBrokerException
    {

...

            boolean doInsert = serviceBrokerHelper().hasNullPKField(cld, 
obj);

returns true. The reason seems to be BrokerHelper.representsNull :

    public boolean representsNull(FieldDescriptor fld, Object aValue)
    {
     .....
        if(((aValue instanceof Number) && (((Number) aValue).longValue() 
== 0)))
        {
            result = fld.getPersistentField().getType().isPrimitive() && 
fld.isPrimaryKey();
        }
      ....
        return result;
    }

returns true for my SMALLINT objects if the value is 0. But 0 is a 
leagal value for SMALLINT PK attributes.
After that PersistenceBrokerImpl.store checks the cache:

            /*
            if PK values are set, lookup cache or db to see whether object
            needs insert or update
            */
            if (!doInsert)
            {
                doInsert = objectCache.lookup(oid) == null
                    && !serviceBrokerHelper().doesExist(cld, oid, obj);
            }

because of doInsert is still true (I checked it) The cache is never 
checked for the object. doInsert is still true and
a few lines later

            // now store it:
            store(obj, oid, cld, doInsert);

generates the insert statement. Maybe I'm wrong but for me it looks like 
a 0 (not null) at any PK field causes a insert statement.
In my case it is immediately the first object. Is it a good idea to 
check the cache independent if doInsert is true or is the implementation
of  representsNull the cause and should be changed ?

best regards,

Guido



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Guido Beutler <gu...@hrs.de>.
Armin Waibel wrote:

> do you use anonymous keys? If so where?
>
> >> Do you remember our DataSource problem with 3.2.2.RC3 with missing
> >> results?
>
> No, can you describe this problem again? Should I update to JBoss 
> 3.2.3 and run the tests again?


we had the problem, that not all objects were returned by OJB. This 
seemed to be a side effect of the eager-release
flag. After Update to JBoss 3.2.3 the problem disapeared. Maybe that the 
bahavior of our current problem is different
in 3.2.3.
I'll put some debug gcode into PersistenceBroker and see what's going on 
during insert/update.

best regards,

Guido

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Armin Waibel <ar...@apache.org>.
do you use anonymous keys? If so where?

 >> Do you remember our DataSource problem with 3.2.2.RC3 with missing
 >> results?

No, can you describe this problem again? Should I update to JBoss 3.2.3 
and run the tests again?

Armin


Guido Beutler wrote:

> Hi again,
> 
> Guido Beutler wrote:
> 
>> Hi Armin,
>>
>> Armin Waibel wrote:
>>
>>> Hi again,
>>>
>>> all ejb-example tests pass (odmg- and PB-Tests) on JBoss 3.2.2 and 
>>> MaxDB. Maybe I forget to write a test for object update ;-).
>>>
>> Do you remember our DataSource problem with 3.2.2.RC3 with missing 
>> results?
>> Maybe that the behavior is different to JBoss 3.2.3., just to have is 
>> said. :-)
>>
>>> > Does ist help? I can not see your Methods at the stack trace. Is it
>>> > possible, that the cache is never checked?
>>> You can't see one of these methods in your stack trace, bacause these 
>>> methods maybe generate a wrong value for boolean 'doInsert' in your 
>>> case.
>>> The change made between rc5 to rc6 is a new check
>>> serviceBrokerHelper().hasNullPKField(cld, obj);
>>> and the
>>> deletedDuringTransaction.contains(oid);
>>> check. Is it possible that you pass a nullified PK field (declared in 
>>> decriptor) when you update an object? In that case OJB try to insert 
>>> the object.
>>>
>>> I think you have two possibilities:
>>> - remote debugging of this part of PBImpl class to see if a wrong 
>>> boolean value was set - signals insert instead of update.
>>> - Put some System.out.println to check the boolean or/and comment out 
>>> the new stuff and see what's going on.
>>
>>
>>
>>
>> I reduced my test to get some objects at a collection and store the 
>> same objects again (without any modification).
>> The test immediately fails at the first insert. Because the select 
>> returns the expected result and the objects are
>> returned by OJB I think I can be sure that the objects are filled 
>> correctly.
>> I'll add some code to store the values before returning them to the 
>> client but I don't think that this will make any difference.
>>
> 
> If I select a collection by OJB and store ist at the same EJB Method 
> (and transaction) a insert instead of update is generated.
> The PK Fields are filled correctly and are not modified during the test.
> 
> best regards,
> 
> Guido
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Guido Beutler <gu...@hrs.de>.
Hi again,

Guido Beutler wrote:

> Hi Armin,
>
> Armin Waibel wrote:
>
>> Hi again,
>>
>> all ejb-example tests pass (odmg- and PB-Tests) on JBoss 3.2.2 and 
>> MaxDB. Maybe I forget to write a test for object update ;-).
>>
> Do you remember our DataSource problem with 3.2.2.RC3 with missing 
> results?
> Maybe that the behavior is different to JBoss 3.2.3., just to have is 
> said. :-)
>
>> > Does ist help? I can not see your Methods at the stack trace. Is it
>> > possible, that the cache is never checked?
>> You can't see one of these methods in your stack trace, bacause these 
>> methods maybe generate a wrong value for boolean 'doInsert' in your 
>> case.
>> The change made between rc5 to rc6 is a new check
>> serviceBrokerHelper().hasNullPKField(cld, obj);
>> and the
>> deletedDuringTransaction.contains(oid);
>> check. Is it possible that you pass a nullified PK field (declared in 
>> decriptor) when you update an object? In that case OJB try to insert 
>> the object.
>>
>> I think you have two possibilities:
>> - remote debugging of this part of PBImpl class to see if a wrong 
>> boolean value was set - signals insert instead of update.
>> - Put some System.out.println to check the boolean or/and comment out 
>> the new stuff and see what's going on.
>
>
>
> I reduced my test to get some objects at a collection and store the 
> same objects again (without any modification).
> The test immediately fails at the first insert. Because the select 
> returns the expected result and the objects are
> returned by OJB I think I can be sure that the objects are filled 
> correctly.
> I'll add some code to store the values before returning them to the 
> client but I don't think that this will make any difference.
>

If I select a collection by OJB and store ist at the same EJB Method 
(and transaction) a insert instead of update is generated.
The PK Fields are filled correctly and are not modified during the test.

best regards,

Guido


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Guido Beutler <gu...@hrs.de>.
Hi Armin,

Armin Waibel wrote:

> Hi again,
>
> all ejb-example tests pass (odmg- and PB-Tests) on JBoss 3.2.2 and 
> MaxDB. Maybe I forget to write a test for object update ;-).
>
Do you remember our DataSource problem with 3.2.2.RC3 with missing results?
Maybe that the behavior is different to JBoss 3.2.3., just to have is 
said. :-)

> > Does ist help? I can not see your Methods at the stack trace. Is it
> > possible, that the cache is never checked?
> You can't see one of these methods in your stack trace, bacause these 
> methods maybe generate a wrong value for boolean 'doInsert' in your case.
> The change made between rc5 to rc6 is a new check
> serviceBrokerHelper().hasNullPKField(cld, obj);
> and the
> deletedDuringTransaction.contains(oid);
> check. Is it possible that you pass a nullified PK field (declared in 
> decriptor) when you update an object? In that case OJB try to insert 
> the object.
>
> I think you have two possibilities:
> - remote debugging of this part of PBImpl class to see if a wrong 
> boolean value was set - signals insert instead of update.
> - Put some System.out.println to check the boolean or/and comment out 
> the new stuff and see what's going on.


I reduced my test to get some objects at a collection and store the same 
objects again (without any modification).
The test immediately fails at the first insert. Because the select 
returns the expected result and the objects are
returned by OJB I think I can be sure that the objects are filled correctly.
I'll add some code to store the values before returning them to the 
client but I don't think that this will make any difference.

best regards,

Guido


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Armin Waibel <ar...@apache.org>.
Hi again,

all ejb-example tests pass (odmg- and PB-Tests) on JBoss 3.2.2 and 
MaxDB. Maybe I forget to write a test for object update ;-).

 > Does ist help? I can not see your Methods at the stack trace. Is it
 > possible, that the cache is never checked?
You can't see one of these methods in your stack trace, bacause these 
methods maybe generate a wrong value for boolean 'doInsert' in your case.
The change made between rc5 to rc6 is a new check
serviceBrokerHelper().hasNullPKField(cld, obj);
and the
deletedDuringTransaction.contains(oid);
check. Is it possible that you pass a nullified PK field (declared in 
decriptor) when you update an object? In that case OJB try to insert the 
object.

I think you have two possibilities:
- remote debugging of this part of PBImpl class to see if a wrong 
boolean value was set - signals insert instead of update.
- Put some System.out.println to check the boolean or/and comment out 
the new stuff and see what's going on.

regards,
Armin

Guido Beutler wrote:

> Armin Waibel wrote:
> 
>> Hi Guido,
>>
>> Guido Beutler wrote:
>>
>>> Hello,
>>>
>>> I updated from RC5 to RC6. I am using OJB inside of JBoss 3.2.3 with 
>>> DB2 V8.
>>> Since update to RC6  OJB generates a insert for every stored object 
>>> when using PB API.
>>> OJB seems not to check if the object exists at database. If the 
>>> object already exist,
>>> a SQL Exception is thrown. (-803 which means dublicated PK). If I try 
>>> to insert the same object
>>> several times, every time the same exception is thrown. If I select 
>>> the object first, OJB generates a insert too.
>>> I tried the same with RC5 (just to be sure that it is not a error at 
>>> the test case) and RC5 works as expected.
>>> If the object exist a update is generated.
>>> Did I miss something or is it a new issue?
>>>
>>
>> hmm, in PBImpl we do:
>>
>> ClassDescriptor cld = getClassDescriptor(obj.getClass());
>> /*
>> if one of the PK fields was null, the objects was new
>> and needs insert
>> */
>> boolean doInsert = serviceBrokerHelper().hasNullPKField(cld, obj);
>> //if one of the PK field represents 'null' OJB assume the object is new
>> Identity oid = new Identity(obj, this, cld);
>>
>> /*
>> if the object has been deleted during this transaction,
>> then we must insert it
>> */
>> boolean shouldRemoveFromDeleted = false;
>> if (!doInsert)
>> {
>>     doInsert = deletedDuringTransaction.contains(oid);
>>     shouldRemoveFromDeleted = true;
>> }
>>
>> /*
>> if PK values are set, lookup cache or db to see whether object
>> needs insert or update
>> */
>> if (!doInsert)
>> {
>>     doInsert = objectCache.lookup(oid) == null
>>         && !serviceBrokerHelper().doesExist(cld, oid, obj);
>> }
>> // now store it:
>> store(obj, oid, cld, doInsert);
>>
>> Which of these methods returns a wrong result?
>>
>> regards,
>> Armin
>>
> Hi Armin, :-)
> 
> that's the stacktrace:
> 
> org.apache.ojb.broker.PersistenceBrokerSQLException: SQL failure while 
> insert object data for class
> ...
>        at 
> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:242) 
> 
>        at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBrokerImpl.java:1620) 
> 
>        at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1537) 
> 
>        at 
> org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:683) 
> 
>        at 
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:174) 
> 
>        at 
> org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:174) 
> 
> 
> And here's the Cache related stuff from ojb.properties:
> 
> #---------------------------------------------------------------------------------------- 
> 
> # Object cache
> #---------------------------------------------------------------------------------------- 
> 
> # The ObjectCacheClass entry tells OJB which concrete ObjectCache
> # implementation is to be used as standard cache.
> # Its also possible to override this entry adding object-cache elements
> # on jdbc-connection-descriptor level and
> # per class-descriptor in repository file. More info see documentation.
> #
> ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl
> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheEmptyImpl
> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheJCSPerClassImpl
> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerClassImpl
> #
> #
> # This property is only relevant if the per class-descriptor object-cache
> # declaration was used in conjunction with metadata runtime changes.
> # If set 'flase' the class name of the object is used
> # to find a per class ObjectCache implementation.
> # If set 'true' the ObjectCacheDescriptor instance is used as key to
> # find a per class ObjectCache, this enables to use different ObjectCache
> # instances for the same class.
> descriptorBasedCaches=false
> #
> #
> # Use CacheFilters to do filter operations before caching methods were
> # called. Build your own filter class by implementing 
> org.apache.ojb.cache.CacheFilter.
> # It is possible to use a arbitrary number of CacheFilters, but this slows
> # down the performance of the cache, thus handle with care.
> #
> # - org.apache.ojb.broker.cache.CacheFilterClassImpl
> # allows filtering of classes
> # - org.apache.ojb.broker.cache.CacheFilterPackageImpl
> # allows filtering of packages
> # More info see Javadoc of the according classes.
> # Set a comma separated list of CacheFilter.
> #ObjectCacheFilter=org.apache.ojb.broker.cache.CacheFilterClassImpl,org.apache.ojb.broker.cache.CacheFilterPackageImpl 
> 
> #
> 
> Does ist help? I can not see your Methods at the stack trace. Is it 
> possible, that the cache is never checked?
> 
> best regards,
> 
> Guido
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Guido Beutler <gu...@hrs.de>.
Armin Waibel wrote:

> Hi Guido,
>
> Guido Beutler wrote:
>
>> Hello,
>>
>> I updated from RC5 to RC6. I am using OJB inside of JBoss 3.2.3 with 
>> DB2 V8.
>> Since update to RC6  OJB generates a insert for every stored object 
>> when using PB API.
>> OJB seems not to check if the object exists at database. If the 
>> object already exist,
>> a SQL Exception is thrown. (-803 which means dublicated PK). If I try 
>> to insert the same object
>> several times, every time the same exception is thrown. If I select 
>> the object first, OJB generates a insert too.
>> I tried the same with RC5 (just to be sure that it is not a error at 
>> the test case) and RC5 works as expected.
>> If the object exist a update is generated.
>> Did I miss something or is it a new issue?
>>
>
> hmm, in PBImpl we do:
>
> ClassDescriptor cld = getClassDescriptor(obj.getClass());
> /*
> if one of the PK fields was null, the objects was new
> and needs insert
> */
> boolean doInsert = serviceBrokerHelper().hasNullPKField(cld, obj);
> //if one of the PK field represents 'null' OJB assume the object is new
> Identity oid = new Identity(obj, this, cld);
>
> /*
> if the object has been deleted during this transaction,
> then we must insert it
> */
> boolean shouldRemoveFromDeleted = false;
> if (!doInsert)
> {
>     doInsert = deletedDuringTransaction.contains(oid);
>     shouldRemoveFromDeleted = true;
> }
>
> /*
> if PK values are set, lookup cache or db to see whether object
> needs insert or update
> */
> if (!doInsert)
> {
>     doInsert = objectCache.lookup(oid) == null
>         && !serviceBrokerHelper().doesExist(cld, oid, obj);
> }
> // now store it:
> store(obj, oid, cld, doInsert);
>
> Which of these methods returns a wrong result?
>
> regards,
> Armin
>
Hi Armin, :-)

that's the stacktrace:

org.apache.ojb.broker.PersistenceBrokerSQLException: SQL failure while 
insert object data for class
...
        at 
org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:242)
        at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.storeToDb(PersistenceBrokerImpl.java:1620)
        at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:1537)
        at 
org.apache.ojb.broker.core.PersistenceBrokerImpl.store(PersistenceBrokerImpl.java:683)
        at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:174)
        at 
org.apache.ojb.broker.core.DelegatingPersistenceBroker.store(DelegatingPersistenceBroker.java:174)

And here's the Cache related stuff from ojb.properties:

#----------------------------------------------------------------------------------------
# Object cache
#----------------------------------------------------------------------------------------
# The ObjectCacheClass entry tells OJB which concrete ObjectCache
# implementation is to be used as standard cache.
# Its also possible to override this entry adding object-cache elements
# on jdbc-connection-descriptor level and
# per class-descriptor in repository file. More info see documentation.
#
ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl
#ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheEmptyImpl
#ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
#ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheJCSPerClassImpl
#ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerClassImpl
#
#
# This property is only relevant if the per class-descriptor object-cache
# declaration was used in conjunction with metadata runtime changes.
# If set 'flase' the class name of the object is used
# to find a per class ObjectCache implementation.
# If set 'true' the ObjectCacheDescriptor instance is used as key to
# find a per class ObjectCache, this enables to use different ObjectCache
# instances for the same class.
descriptorBasedCaches=false
#
#
# Use CacheFilters to do filter operations before caching methods were
# called. Build your own filter class by implementing 
org.apache.ojb.cache.CacheFilter.
# It is possible to use a arbitrary number of CacheFilters, but this slows
# down the performance of the cache, thus handle with care.
#
# - org.apache.ojb.broker.cache.CacheFilterClassImpl
# allows filtering of classes
# - org.apache.ojb.broker.cache.CacheFilterPackageImpl
# allows filtering of packages
# More info see Javadoc of the according classes.
# Set a comma separated list of CacheFilter.
#ObjectCacheFilter=org.apache.ojb.broker.cache.CacheFilterClassImpl,org.apache.ojb.broker.cache.CacheFilterPackageImpl
#

Does ist help? I can not see your Methods at the stack trace. Is it 
possible, that the cache is never checked?

best regards,

Guido

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: Insert instead of update generated in RC6

Posted by Armin Waibel <ar...@apache.org>.
Hi Guido,

Guido Beutler wrote:
> Hello,
> 
> I updated from RC5 to RC6. I am using OJB inside of JBoss 3.2.3 with DB2 
> V8.
> Since update to RC6  OJB generates a insert for every stored object when 
> using PB API.
> OJB seems not to check if the object exists at database. If the object 
> already exist,
> a SQL Exception is thrown. (-803 which means dublicated PK). If I try to 
> insert the same object
> several times, every time the same exception is thrown. If I select the 
> object first, OJB generates a insert too.
> I tried the same with RC5 (just to be sure that it is not a error at the 
> test case) and RC5 works as expected.
> If the object exist a update is generated.
> Did I miss something or is it a new issue?
> 

hmm, in PBImpl we do:

ClassDescriptor cld = getClassDescriptor(obj.getClass());
/*
if one of the PK fields was null, the objects was new
and needs insert
*/
boolean doInsert = serviceBrokerHelper().hasNullPKField(cld, obj);
//if one of the PK field represents 'null' OJB assume the object is new
Identity oid = new Identity(obj, this, cld);

/*
if the object has been deleted during this transaction,
then we must insert it
*/
boolean shouldRemoveFromDeleted = false;
if (!doInsert)
{
     doInsert = deletedDuringTransaction.contains(oid);
     shouldRemoveFromDeleted = true;
}

/*
if PK values are set, lookup cache or db to see whether object
needs insert or update
*/
if (!doInsert)
{
     doInsert = objectCache.lookup(oid) == null
         && !serviceBrokerHelper().doesExist(cld, oid, obj);
}
// now store it:
store(obj, oid, cld, doInsert);

Which of these methods returns a wrong result?

regards,
Armin

> best regards,
> 
> Guido
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Insert instead of update generated in RC6

Posted by Guido Beutler <gu...@hrs.de>.
Hello,

I updated from RC5 to RC6. I am using OJB inside of JBoss 3.2.3 with DB2 V8.
Since update to RC6  OJB generates a insert for every stored object when 
using PB API.
OJB seems not to check if the object exists at database. If the object 
already exist,
a SQL Exception is thrown. (-803 which means dublicated PK). If I try to 
insert the same object
several times, every time the same exception is thrown. If I select the 
object first, OJB generates a insert too.
I tried the same with RC5 (just to be sure that it is not a error at the 
test case) and RC5 works as expected.
If the object exist a update is generated.
Did I miss something or is it a new issue?

best regards,

Guido

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: auto-delete does not work anymore: rc6???

Posted by Armin Waibel <ar...@apache.org>.
Hi Andreas,

I made a quick test. It works for me. Did you replace the repository.dtd?
Can you post the source code snip?

regards,
Armin

Andreas Bohnert wrote:
> 
> 
> hello everbody,
> 
> today I checked out the rc6 cvs version and did some validation tests on 
> my application.
> I found out, that there is something going wrong, when I delete an object.
> 
> I have an decomposed n-m relation:
> 
> CONTACT --------INSTITUTION_CONTACT ------- INSTITUTION
> 
> when I delete an INSTITUTION_CONTACT the related INSTITUTION and the 
> CONTACT are deleted as well!!
> I have put an auto-delete=false in my metadata, so I don't see a reason 
> for that action.
> 
> here is the metadata for INSTITUTION_CONTACT :
> class-descriptor
> class="at.weberhofer.eusoda.shared.orm.Institution_Contact"
> table="institution_contact"
> 
>>
> <field-descriptor id="0"
>   name="institutionContactId"
>   column="institution_contact_id"
>   jdbc-type="INTEGER"
>   primarykey="true"
>   autoincrement="true"
> />
> <field-descriptor id="1"
>   name="contactId"
>   column="contact_id"
>   jdbc-type="INTEGER"
> />
> <field-descriptor id="2"
>   name="institutionId"
>   column="institution_id"
>   jdbc-type="INTEGER"
> />
> <field-descriptor id="3"
>   name="isPublic"
>   column="isPublic"
>   jdbc-type="TINYINT"
> />
> <field-descriptor id="4"
>   name="contactPrivileges"
>   column="contactPrivileges"
>   jdbc-type="INTEGER"
> />
> <field-descriptor id="5"
>   name="sortHelp"
>   column="sortHelp"
>   jdbc-type="INTEGER"
> />
> <field-descriptor id="6"
>   name="updateTime"
>   column="updateTime"
>   jdbc-type="TIMESTAMP"
> />
> 
>   <reference-descriptor
>    name="contact"
>    auto-retrieve="true"
>    auto-update="true"
>    auto-delete="false"
>    class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>  >
>    <foreignkey field-ref="contactId"/>
> </reference-descriptor>
> 
>   <reference-descriptor
>    name="institution"
>    auto-retrieve="true"
>    auto-update="true"
>    auto-delete="false"
>    class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>  >
>    <foreignkey field-ref="institutionId"/>
> </reference-descriptor>
> 
> 
> </class-descriptor>
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: auto-delete does not work anymore: rc6???

Posted by Armin Waibel <ar...@apache.org>.
Hi Andreas,

I think you are right, seems auto-delete false/true is not handled 
correct. I will fix this.

regards,
Armin

Andreas Bohnert wrote:

> hi armin,
> 
> 
> that was a good suggestion! I don't change the meta data at runtime, but 
> it seems that my auto-delete='false' is replaced (because it's now 
> deprecated) with an auto-delete='object',
> but it should be replaced with 'none'! well, that what I would excpect ;)
> 
> thats what I got:
> 
> <reference-descriptor
>        name="contact"
>        class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>        auto-retrieve="true"
>        auto-update="object"
>        auto-delete="object"
>      >
>        <foreignkey field-ref="contactId"/>
>      </reference-descriptor>
> 
> and that is what it should be
> 
>  <reference-descriptor
>   name="contact"
>   auto-retrieve="true"
>   auto-update="true"
>   auto-delete="false"
>   class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>  >
>   <foreignkey field-ref="contactId"/>
> </reference-descriptor>
> 
> regards
> andreas
> 
> Armin Waibel wrote:
> 
>> Hi Andreas,
>>
>> your code seems ok. Do you manipulate metadata at runtime? Maybe the 
>> auto-delete flag change at runtime. Can you check this in your 
>> deleteValidate(...)-method
>>
>> Collection ords = 
>> broker.getClassDescriptor(Repository.class).getObjectReferenceDescriptors(); 
>>
>> for(Iterator iterator = ords.iterator(); iterator.hasNext();)
>> {
>>    String str = ((ObjectReferenceDescriptor) iterator.next()).toXML();
>>    System.out.println(str);
>> }
>>
>> and check if the auto-delete is really false (false == 17, true == 23)
>>
>> regards,
>> Armin
>>
>> Andreas Bohnert wrote:
>>
>>> hello armin,
>>>
>>> yes, I did replace the repository.dtd.
>>> I just simplified my application source. Here is the client/server 
>>> code that produce the wrong deletes.
>>> I'm using jboss 3.2.3 and postgresql 7.4.1.
>>> the repository files and the database structure is attached.
>>>
>>> it's strange, because I think, the ojb junit testcase should cover 
>>> this situation, and it's also strange, that no one else complained
>>> thanks,
>>> andreas
>>>
>>> ejb code:
>>> /**
>>>     * @ejb:interface-method
>>>     */
>>>    public void deleteValidate(Class dClass, Criteria crit) throws 
>>> Exception {
>>>        PersistenceBroker broker = getBroker();
>>>        Object o = null;
>>>        try {
>>>            Query query = QueryFactory.newQuery( dClass, crit, false 
>>> );                      o = broker.getObjectByQuery(query);
>>>            log.debug("object to delete: "+o);
>>>            broker.delete( o );
>>>        } catch (PersistenceBrokerException e) {
>>>            log.error("object could not be deleted: " + o);
>>>            throw new Exception(e);
>>>        }
>>>        broker.close();
>>>    }
>>>   client code:
>>>    public void deleteValidateClient() {
>>>        Criteria crit = new Criteria();
>>>        crit.addEqualTo("institution_contact_id", new Integer(1049080));
>>>        try {
>>>            OJBSessionRemote ojb = OjbUtil.getOJBSessionRemote();
>>>            ojb.deleteValidate( Institution_Contact.class, crit );
>>>        } catch (OJBLayerExc e) {
>>>            e.printStackTrace();
>>>        } catch (RemoteException e) {
>>>            e.printStackTrace();
>>>        } catch (Exception e) {
>>>            e.printStackTrace();
>>>        }
>>>    }
>>>
>>> this is the resulting spy.log:
>>> 1080640877421|15|0|statement|DELETE FROM institution_contact WHERE 
>>> institution_contact_id = ? |DELETE FROM institution_contact WHERE 
>>> institution_contact_id = '1049080'
>>> 1080640877421|0|0|statement|DELETE FROM contact WHERE contact_id = ? 
>>> |DELETE FROM contact WHERE contact_id = '1049040'
>>> 1080640877437|0|0|statement|DELETE FROM institution WHERE 
>>> institution_id = ? |DELETE FROM institution WHERE institution_id = 
>>> '1048857'
>>>
>>>
>>>
>>>
>>>  >Hi Andreas,
>>>
>>>  >I made a quick test. It works for me. Did you replace the 
>>> repository.dtd?
>>>  >Can you post the source code snip?
>>>
>>>  >regards,
>>>  >Armin
>>>
>>>
>>>
>>> Andreas Bohnert wrote:
>>>
>>>>
>>>>
>>>> hello everbody,
>>>>
>>>> today I checked out the rc6 cvs version and did some validation 
>>>> tests on my application.
>>>> I found out, that there is something going wrong, when I delete an 
>>>> object.
>>>>
>>>> I have an decomposed n-m relation:
>>>>
>>>> CONTACT --------INSTITUTION_CONTACT ------- INSTITUTION
>>>>
>>>> when I delete an INSTITUTION_CONTACT the related INSTITUTION and the 
>>>> CONTACT are deleted as well!!
>>>> I have put an auto-delete=false in my metadata, so I don't see a 
>>>> reason for that action.
>>>>
>>>> here is the metadata for INSTITUTION_CONTACT :
>>>> class-descriptor
>>>> class="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>>>> table="institution_contact"
>>>>
>>>>>
>>>> <field-descriptor id="0"
>>>>   name="institutionContactId"
>>>>   column="institution_contact_id"
>>>>   jdbc-type="INTEGER"
>>>>   primarykey="true"
>>>>   autoincrement="true"
>>>> />
>>>> <field-descriptor id="1"
>>>>   name="contactId"
>>>>   column="contact_id"
>>>>   jdbc-type="INTEGER"
>>>> />
>>>> <field-descriptor id="2"
>>>>   name="institutionId"
>>>>   column="institution_id"
>>>>   jdbc-type="INTEGER"
>>>> />
>>>> <field-descriptor id="3"
>>>>   name="isPublic"
>>>>   column="isPublic"
>>>>   jdbc-type="TINYINT"
>>>> />
>>>> <field-descriptor id="4"
>>>>   name="contactPrivileges"
>>>>   column="contactPrivileges"
>>>>   jdbc-type="INTEGER"
>>>> />
>>>> <field-descriptor id="5"
>>>>   name="sortHelp"
>>>>   column="sortHelp"
>>>>   jdbc-type="INTEGER"
>>>> />
>>>> <field-descriptor id="6"
>>>>   name="updateTime"
>>>>   column="updateTime"
>>>>   jdbc-type="TIMESTAMP"
>>>> />
>>>>
>>>>   <reference-descriptor
>>>>    name="contact"
>>>>    auto-retrieve="true"
>>>>    auto-update="true"
>>>>    auto-delete="false"
>>>>    class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>>>> >
>>>>    <foreignkey field-ref="contactId"/>
>>>> </reference-descriptor>
>>>>
>>>>   <reference-descriptor
>>>>    name="institution"
>>>>    auto-retrieve="true"
>>>>    auto-update="true"
>>>>    auto-delete="false"
>>>>    class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>>> >
>>>>    <foreignkey field-ref="institutionId"/>
>>>> </reference-descriptor>
>>>>
>>>>
>>>> </class-descriptor>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>>
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> <class-descriptor
>>>   class="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>>>   table="institution_contact"
>>>
>>>   <field-descriptor id="0"
>>>     name="institutionContactId"
>>>     column="institution_contact_id"
>>>     jdbc-type="INTEGER"
>>>     primarykey="true"
>>>     autoincrement="true"
>>>   />
>>>   <field-descriptor id="1"
>>>     name="contactId"
>>>     column="contact_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="2"
>>>     name="institutionId"
>>>     column="institution_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="3"
>>>     name="isPublic"
>>>     column="isPublic"
>>>     jdbc-type="TINYINT"
>>>   />
>>>   <field-descriptor id="4"
>>>     name="contactPrivileges"
>>>     column="contactPrivileges"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="5"
>>>     name="sortHelp"
>>>     column="sortHelp"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="6"
>>>     name="updateTime"
>>>     column="updateTime"
>>>     jdbc-type="TIMESTAMP"
>>>   />
>>>
>>>     <reference-descriptor
>>>      name="contact"
>>>      auto-retrieve="true"
>>>      auto-update="true"
>>>      auto-delete="false"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>>>   >
>>>      <foreignkey field-ref="contactId"/>
>>>   </reference-descriptor>
>>>
>>>     <reference-descriptor
>>>      name="institution"
>>>      auto-retrieve="true"
>>>      auto-update="true"
>>>      auto-delete="false"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>>   >
>>>      <foreignkey field-ref="institutionId"/>
>>>   </reference-descriptor>
>>>
>>>
>>> </class-descriptor>
>>>
>>>
>>> <class-descriptor
>>>   class="at.weberhofer.eusoda.shared.orm.Contact"
>>>   table="contact"
>>>
>>>   <field-descriptor id="1"
>>>     name="contactId"
>>>     column="contact_id"
>>>     jdbc-type="INTEGER"
>>>     primarykey="true"
>>>     autoincrement="true"
>>>   />
>>>   <field-descriptor id="2"
>>>     name="genderAppResKeyId"
>>>     column="genderAppResKey_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="3"
>>>     name="descUserResKeyId"
>>>     column="descUserResKey_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="4"
>>>     name="updateContactId"
>>>     column="updateContact_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="5"
>>>     name="salutation"
>>>     column="salutation"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="6"
>>>     name="academicTitle"
>>>     column="academicTitle"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="7"
>>>     name="functionalTitle"
>>>     column="functionalTitle"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="8"
>>>     name="firstName"
>>>     column="firstName"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="9"
>>>     name="lastName"
>>>     column="lastName"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="10"
>>>     name="profession"
>>>     column="profession"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="11"
>>>     name="login"
>>>     column="login"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="12"
>>>     name="pwd"
>>>     column="pwd"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="13"
>>>     name="isRemoved"
>>>     column="isRemoved"
>>>     jdbc-type="TINYINT"
>>>   />
>>>   <field-descriptor id="14"
>>>     name="isPopup"
>>>     column="isPopup"
>>>     jdbc-type="TINYINT"
>>>   />
>>>   <field-descriptor id="15"
>>>     name="updateTime"
>>>     column="updateTime"
>>>     jdbc-type="TIMESTAMP"
>>>   />
>>>
>>>   <reference-descriptor
>>>      name="descUserResKey"
>>>      auto-retrieve="false"
>>>      auto-update="true"
>>>      auto-delete="true"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>>>   >
>>>      <foreignkey field-ref="descUserResKeyId"/>
>>>   </reference-descriptor>
>>>
>>>   <reference-descriptor
>>>      name="genderAppResKey"
>>>      auto-retrieve="false"
>>>      auto-update="false"
>>>      auto-delete="false"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.AppResKey"
>>>   >
>>>      <foreignkey field-ref="genderAppResKeyId"/>
>>>   </reference-descriptor>
>>>
>>>   <collection-descriptor
>>>          name="institutionContacts"
>>>          
>>> element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>>>          auto-retrieve="false"
>>>          auto-update="false"
>>>          auto-delete="false"
>>>       >
>>>       <inverse-foreignkey field-ref="contactId"/>
>>>   </collection-descriptor>
>>>
>>>   <collection-descriptor
>>>          name="contactAppResKey"
>>>          
>>> element-class-ref="at.weberhofer.eusoda.shared.orm.Contact_AppResKey"
>>>          auto-retrieve="true"
>>>          auto-update="true"
>>>          auto-delete="false"
>>>       >
>>>       <inverse-foreignkey field-ref="contactId"/>
>>>   </collection-descriptor>
>>>
>>>   <collection-descriptor
>>>      name="contactRegions"
>>>      element-class-ref="at.weberhofer.eusoda.shared.orm.Contact_Region"
>>>      auto-retrieve="false"
>>>      auto-update="false"
>>>      auto-delete="false"
>>>      >
>>>      <inverse-foreignkey field-ref="contactId"/>
>>>   </collection-descriptor>
>>>
>>> </class-descriptor>
>>>
>>> <class-descriptor
>>>   class="at.weberhofer.eusoda.shared.orm.Institution"
>>>   table="institution"
>>>
>>>   <field-descriptor id="1"
>>>     name="institutionId"
>>>     column="institution_id"
>>>     jdbc-type="INTEGER"
>>>     primarykey="true"
>>>     autoincrement="true"
>>>   />
>>>   <field-descriptor id="2"
>>>     name="topInstitutionId"
>>>     column="topInstitution_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="3"
>>>     name="umbrellaInstitutionId"
>>>     column="umbrellaInstitution_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="4"
>>>     name="createContactId"
>>>     column="createContact_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="5"
>>>     name="updateContactId"
>>>     column="updateContact_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="6"
>>>     name="instDescUserResKeyId"
>>>     column="instDescUserResKey_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="7"
>>>     name="businessHoursUserResKeyId"
>>>     column="businessHoursUserResKey_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="8"
>>>     name="instTypeAppResKeyId"
>>>     column="instTypeAppResKey_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="9"
>>>     name="institution1"
>>>     column="institution1"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="10"
>>>     name="institution2"
>>>     column="institution2"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="11"
>>>     name="isPublic"
>>>     column="isPublic"
>>>     jdbc-type="TINYINT"
>>>   />
>>>   <field-descriptor id="12"
>>>     name="infoInternal"
>>>     column="infoInternal"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="13"
>>>     name="foundationDate"
>>>     column="foundationDate"
>>>     jdbc-type="TIMESTAMP"
>>>   />
>>>   <field-descriptor id="14"
>>>     name="sortHelp"
>>>     column="sortHelp"
>>>     jdbc-type="SMALLINT"
>>>   />
>>>   <field-descriptor id="15"
>>>     name="isUmbrella"
>>>     column="isUmbrella"
>>>     jdbc-type="TINYINT"
>>>   />
>>>   <field-descriptor id="16"
>>>     name="isRemoved"
>>>     column="isRemoved"
>>>     jdbc-type="TINYINT"
>>>   />
>>>   <field-descriptor id="17"
>>>     name="createTime"
>>>     column="createTime"
>>>     jdbc-type="TIMESTAMP"
>>>   />
>>>   <field-descriptor id="18"
>>>     name="updateTime"
>>>     column="updateTime"
>>>     jdbc-type="TIMESTAMP"
>>>   />
>>>
>>>   <reference-descriptor
>>>      name="instDescUserResKey"
>>>      auto-retrieve="false"
>>>      auto-update="true"
>>>      auto-delete="true"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>>>      >
>>>      <foreignkey field-ref="instDescUserResKeyId"/>
>>>   </reference-descriptor>
>>>
>>>   <reference-descriptor
>>>      name="businessHoursUserResKey"
>>>      auto-retrieve="false"
>>>      auto-update="true"
>>>      auto-delete="true"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>>>      >
>>>      <foreignkey field-ref="businessHoursUserResKeyId"/>
>>>   </reference-descriptor>
>>>
>>>   <reference-descriptor
>>>      name="instTypeAppResKey"
>>>      auto-retrieve="false"
>>>      auto-update="false"
>>>      auto-delete="false"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.AppResKey"
>>>      >
>>>      <foreignkey field-ref="instTypeAppResKeyId"/>
>>>   </reference-descriptor>
>>>
>>>   <reference-descriptor
>>>      name="topInstitution"
>>>      auto-retrieve="true"
>>>      auto-update="true"
>>>      auto-delete="false"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>>      >
>>>      <foreignkey field-ref="topInstitutionId"/>
>>>   </reference-descriptor>
>>>
>>>   <reference-descriptor
>>>      name="umbrellaInstitution"
>>>      auto-retrieve="true"
>>>      auto-update="true"
>>>      auto-delete="false"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>>      >
>>>      <foreignkey field-ref="umbrellaInstitutionId"/>
>>>   </reference-descriptor>
>>>
>>>   <collection-descriptor
>>>      name="institutionRegions"
>>>      
>>> element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Region"
>>>      auto-retrieve="false"
>>>      auto-update="true"
>>>      auto-delete="false"
>>>      >
>>>      <inverse-foreignkey field-ref="institutionId"/>
>>>   </collection-descriptor>
>>>
>>>   <collection-descriptor
>>>          name="institutionContacts"
>>>          
>>> element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>>>          auto-retrieve="false"
>>>          auto-update="false"
>>>          auto-delete="false"
>>>       >
>>>       <inverse-foreignkey field-ref="institutionId"/>
>>>   </collection-descriptor>
>>>
>>> </class-descriptor>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> CREATE TABLE institution (
>>>     institution_id integer DEFAULT 0 NOT NULL,
>>>     topinstitution_id integer DEFAULT 0 NOT NULL,
>>>     umbrellainstitution_id integer DEFAULT 0 NOT NULL,
>>>     createcontact_id integer DEFAULT 0 NOT NULL,
>>>     updatecontact_id integer DEFAULT 0 NOT NULL,
>>>     instdescuserreskey_id integer DEFAULT 0 NOT NULL,
>>>     businesshoursuserreskey_id integer DEFAULT 0 NOT NULL,
>>>     insttypeappreskey_id integer DEFAULT 0 NOT NULL,
>>>     institution1 character varying(120) DEFAULT ''::character varying 
>>> NOT NULL,
>>>     institution2 character varying(120) DEFAULT ''::character varying 
>>> NOT NULL,
>>>     ispublic smallint DEFAULT (1)::smallint NOT NULL,
>>>     infointernal character varying(255) DEFAULT ''::character varying 
>>> NOT NULL,
>>>     foundationdate timestamp without time zone DEFAULT '0001-01-01 
>>> 00:00:00'::timestamp without time zone,
>>>     sorthelp smallint DEFAULT (0)::smallint NOT NULL,
>>>     isumbrella smallint DEFAULT (0)::smallint NOT NULL,
>>>     isremoved smallint DEFAULT (0)::smallint NOT NULL,
>>>     createtime timestamp without time zone DEFAULT '0001-01-01 
>>> 00:00:00'::timestamp without time zone NOT NULL,
>>>     updatetime timestamp without time zone DEFAULT '0001-01-01 
>>> 00:00:00'::timestamp without time zone NOT NULL
>>> );
>>>
>>> ALTER TABLE ONLY institution
>>>     ADD CONSTRAINT institution_pkey PRIMARY KEY (institution_id);
>>>
>>>
>>>
>>>
>>> CREATE TABLE contact (
>>>     contact_id integer DEFAULT 0 NOT NULL,
>>>     descuserreskey_id integer DEFAULT 0 NOT NULL,
>>>     updatecontact_id integer DEFAULT 0 NOT NULL,
>>>     genderappreskey_id integer DEFAULT 0 NOT NULL,
>>>     salutation character varying(80) DEFAULT ''::character varying 
>>> NOT NULL,
>>>     academictitle character varying(80) DEFAULT ''::character varying 
>>> NOT NULL,
>>>     functionaltitle character varying(80) DEFAULT ''::character 
>>> varying NOT NULL,
>>>     firstname character varying(80) DEFAULT ''::character varying NOT 
>>> NULL,
>>>     lastname character varying(80) DEFAULT ''::character varying NOT 
>>> NULL,
>>>     profession character varying(255) DEFAULT ''::character varying 
>>> NOT NULL,
>>>     login character varying(10) DEFAULT ''::character varying NOT NULL,
>>>     pwd character varying(80) DEFAULT ''::character varying NOT NULL,
>>>     isremoved smallint DEFAULT (0)::smallint NOT NULL,
>>>     updatetime timestamp without time zone DEFAULT '0001-01-01 
>>> 00:00:00'::timestamp without time zone NOT NULL,
>>>     ispopup smallint DEFAULT 0
>>> );
>>>
>>> ALTER TABLE ONLY contact
>>>     ADD CONSTRAINT contact_pkey PRIMARY KEY (contact_id);
>>>
>>>
>>>
>>> CREATE TABLE institution_contact (
>>>     institution_contact_id integer DEFAULT 0 NOT NULL,
>>>     contact_id integer DEFAULT 0 NOT NULL,
>>>     institution_id integer DEFAULT 0 NOT NULL,
>>>     contactprivileges integer DEFAULT 0 NOT NULL,
>>>     ispublic smallint,
>>>     sorthelp integer DEFAULT 0 NOT NULL,
>>>     updatetime timestamp without time zone DEFAULT '0001-01-01 
>>> 00:00:00'::timestamp without time zone NOT NULL
>>> );
>>>
>>> ALTER TABLE ONLY institution_contact
>>>     ADD CONSTRAINT institution_contact_pkey PRIMARY KEY 
>>> (institution_contact_id);
>>>
>>>
>>> INSERT INTO institution VALUES (1048857, 1048817, 0, 0, 1, 1050040, 
>>> 1050041, 40, 'Ebay', '', 1, 'internal', NULL, 0, 1, 0, '2004-03-22 
>>> 16:03:25.609', '2004-03-30 11:48:29.046');
>>> INSERT INTO contact VALUES (1049040, 0, 1, 35, '', '', '', '', 
>>> 'deleteUser', '', 'du', '13A014CB9DE9F7CAD88D5DAFB70ECB41', 0, 
>>> '2004-03-30 11:48:08.265', 0);
>>> INSERT INTO institution_contact VALUES (1049080, 1049040, 1048857, 1, 
>>> 0, 0, '2004-03-30 11:48:29.046');
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> # OJB.properties -- configuration of the OJB runtime environment
>>> # Version: 1.0
>>> # (c) 2001, 2002, 2003 Apache Software Foundation
>>> # Author: Thomas Mahler and many others
>>> # @version $Id: OJB.properties,v 1.63 2004/03/24 13:58:01 tomdz Exp $
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # repository file settings
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The repositoryFile entry tells OJB to use this file as as its 
>>> standard mapping
>>> # repository. The file is looked up from the classpath.
>>> #
>>> repositoryFile=repository.xml
>>> #
>>> # If the useSerializedRepository entry is set to true, OJB tries to 
>>> load a
>>> # serialized version of the repository for performance reasons.
>>> # if set to false, OJB always loads the xml file.
>>> # Setting this flag to true will accelerate the startup sequence of OJB.
>>> # If set to true changes to the repository.xml file will only be 
>>> detected
>>> # after maually deleting the repository.xml.serialized file.
>>> useSerializedRepository=false
>>> #
>>> # If Repository serialization is used the entry 
>>> serializedRepositoryPath defines the
>>> # directory where the Repository is written to and read from.
>>> # this entry is used only when the useSerializedRepository flag is 
>>> set to true
>>> #
>>> serializedRepositoryPath=.
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # PersistenceBrokerFactory / PersistenceBroker
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The PersistenceBrokerFactoryClass entry decides which concrete
>>> # PersistenceBrokerFactory implemention is to be used.
>>> PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl 
>>>
>>> # If in managed environment *only* the PB-api was used it's 
>>> recommended to use this factory
>>> # to enable the PersistenceBroker instances to participate in the JTA 
>>> transaction. This makes
>>> # e.g. PBStateListener work properly in managed environments.
>>> # eusoda
>>> #PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl 
>>>
>>> #
>>> #
>>> # The PersistenceBrokerClass entry decides which concrete 
>>> PersistenceBroker
>>> # implementation is to be served by the PersistenceBrokerFactory.
>>> # This is the singlevm implementation:
>>> PersistenceBrokerClass=org.apache.ojb.broker.core.PersistenceBrokerImpl
>>> #
>>> # This is an implementation that uses Prevayler (prevayler.sf.net) as 
>>> the persistent storage.
>>> # Using this implementation OJB works as a simple OODBMS
>>> #PersistenceBrokerClass=org.apache.ojb.broker.prevayler.PBPrevaylerImpl
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # PersistenceBroker pool
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # PersistenceBroker pool configuration
>>> # This pool uses the jakarta-commons-pool api.
>>> # There you can find things described in detail.
>>> #
>>> # maximum number of brokers that can be borrowed from the
>>> # pool at one time. When non-positive, there is no limit.
>>> maxActive=100
>>> #
>>> # controls the maximum number of brokers that can sit idle in the
>>> # pool (per key) at any time. When non-positive, there is no limit
>>> maxIdle=-1
>>> #
>>> # max time block to get broker instance from pool, after that 
>>> exception is thrown.
>>> # When non-positive, block till last judgement
>>> maxWait=2000
>>> #
>>> # indicates how long the eviction thread should sleep before "runs" 
>>> of examining
>>> # idle objects. When non-positive, no eviction thread will be launched.
>>> timeBetweenEvictionRunsMillis=-1
>>> #
>>> # specifies the minimum amount of time that an broker may sit idle
>>> # in the pool before it is eligable for eviction due to idle time.
>>> # When non-positive, no object will be dropped from the pool due
>>> # to idle time alone (depends on timeBetweenEvictionRunsMillis > 0)
>>> minEvictableIdleTimeMillis=1000000
>>> #
>>> # specifies the behaviour of the pool when broker capacity is
>>> # exhausted (see maxActive above)
>>> # 0 - fail
>>> # 1 - block
>>> # 2 - grow
>>> whenExhaustedAction=0
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # ConnectionFactory / Default ConnectionPool
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The ConnectionFactoryClass entry determines which kind of 
>>> ConnectionFactory
>>> # is to be used within org.apache.ojb as connection factory.
>>> # A ConnectionFactory is responsible for creating
>>> # JDBC Connections. Current version ships four implementations:
>>> #
>>> # 1. ConnectionFactoryNotPooledImpl
>>> #    No pooling, no playing around.
>>> #    Every connection request returns a new connection,
>>> #    every connection release close the connection.
>>> # 2. ConnectionFactoryPooledImpl
>>> #    This implementation supports connection pooling.
>>> # 3. ConnectionFactoryDBCPImpl
>>> #    Using the jakarta-DBCP api for connection management, support
>>> #    connection- and prepared statement-pooling, abandoned connection 
>>> handling.
>>> # 4. ConnectionFactoryManagedImpl
>>> #    Connection factory for use within managed environments - e.g. 
>>> JBoss.
>>> #    Every obtained DataSource was wrapped within OJB (and ignore
>>> #    e.g. con.commit() calls within OJB).
>>> #    Use this implementation e.g if you use Datasources from an 
>>> application server.
>>> #
>>> # Use the OJB performance tests to decide, which implementation is 
>>> best for you.
>>> # The proper way of obtaining a connection is configured in
>>> # JDBCConnectionDescriptor entries in the repository.xml file.
>>> # If want a more fine grained control of each connection pool used by 
>>> OJB,
>>> # take a look at the repository.dtd, there was a possibility to override
>>> # this default connection factory entry in each 
>>> JDBCConnectionDescriptor.
>>> #
>>> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl 
>>>
>>> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl 
>>>
>>> #eusoda
>>> ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl 
>>>
>>> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl 
>>>
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # ConnectionManager
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The ConnectionManagerClass entry defines the ConnectionManager 
>>> implemementation to be used
>>> ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl 
>>>
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # SqlGenerator
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The SqlGeneratorClass entry defines the SqlGenerator 
>>> implemementation to be used
>>> SqlGeneratorClass=org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl 
>>>
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # CollectionProxy class
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The optional CollectionProxy entry defines the class to be used for 
>>> CollectionProxies
>>> # if this entry is null org.apache.ojb.broker.accesslayer.ListProxy 
>>> is used for Lists
>>> # and org.apache.ojb.broker.accesslayer.CollectionProxy for Collections
>>> #
>>> #CollectionProxyClass=
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # StatementManager
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The StatementManagerClass entry defines the StatementManager 
>>> implemementation to be used
>>> StatementManagerClass=org.apache.ojb.broker.accesslayer.StatementManager
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # StatementsForClass
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The StatementsForClassClass entry defines the StatementsForClass 
>>> implemementation to be used
>>> # to implement cached statements.
>>> StatementsForClassClass=org.apache.ojb.broker.accesslayer.StatementsForClassImpl 
>>>
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # JdbcAccess
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The JdbcAccessClass entry defines the JdbcAccess implemementation 
>>> to be used
>>> JdbcAccessClass=org.apache.ojb.broker.accesslayer.JdbcAccessImpl
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Object cache
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The ObjectCacheClass entry tells OJB which concrete ObjectCache
>>> # implementation is to be used as standard cache.
>>> # Its also possible to override this entry adding object-cache elements
>>> # on jdbc-connection-descriptor level and
>>> # per class-descriptor in repository file. More info see documentation.
>>> #
>>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl
>>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheEmptyImpl
>>> #eusoda
>>> ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
>>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheJCSPerClassImpl
>>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerClassImpl
>>> #
>>> #
>>> # This property is only relevant if the per class-descriptor 
>>> object-cache
>>> # declaration was used in conjunction with metadata runtime changes.
>>> # If set 'flase' the class name of the object is used
>>> # to find a per class ObjectCache implementation.
>>> # If set 'true' the ObjectCacheDescriptor instance is used as key to
>>> # find a per class ObjectCache, this enables to use different 
>>> ObjectCache
>>> # instances for the same class.
>>> descriptorBasedCaches=false
>>> #
>>> #
>>> # Use CacheFilters to do filter operations before caching methods were
>>> # called. Build your own filter class by implementing 
>>> org.apache.ojb.cache.CacheFilter.
>>> # It is possible to use a arbitrary number of CacheFilters, but this 
>>> slows
>>> # down the performance of the cache, thus handle with care.
>>> #
>>> # - org.apache.ojb.broker.cache.CacheFilterClassImpl
>>> # allows filtering of classes
>>> # - org.apache.ojb.broker.cache.CacheFilterPackageImpl
>>> # allows filtering of packages
>>> # More info see Javadoc of the according classes.
>>> # Set a comma separated list of CacheFilter.
>>> #ObjectCacheFilter=org.apache.ojb.broker.cache.CacheFilterClassImpl,org.apache.ojb.broker.cache.CacheFilterPackageImpl 
>>>
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Locking
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The LockManagerClass entry tells OJB which concrete LockManager
>>> # implementation is to be used.
>>> LockManagerClass=org.apache.ojb.odmg.locking.LockManagerDefaultImpl
>>> #
>>> # The LockMapClass entry tells OJB which concrete LockMap
>>> # implementation is to be used.
>>> # If OJB is running on multiple concurrent clients it is recommended
>>> # to use the RemoteLockMapImpl. It guarantees to provide
>>> # Lockmanagement across multiple JVMs.
>>> # This Implemenation relies on a Servlet based Lockserver. To use it 
>>> you have to
>>> # deploy the ojb-lockserver.war into a Servlet engine.
>>> # and you have to set the Property LockServletUrl to point to this 
>>> servlet.
>>> # (see LockServletUrl section below).
>>> # If OJB is running in a single JVM (e.g. in a desktop app, or in a 
>>> servlet
>>> # engine) it is save to use the InMemoryLockMapImpl. Using it will 
>>> result
>>> # in a large performance gain.
>>> #LockMapClass=org.apache.ojb.odmg.locking.RemoteLockMapImpl
>>> LockMapClass=org.apache.ojb.odmg.locking.InMemoryLockMapImpl
>>> #
>>> # The LockTimeout entry defines the maximum time in milliseconds
>>> # that a lock may be hold. Defaults to 60000 = 1 minute
>>> LockTimeout=60000
>>> #
>>> # The ImplicitLocking entry defines if implicit lock acquisition is
>>> # to be used. If set to true OJB implicitely locks objects to ODMG
>>> # transactions after performing OQL queries.
>>> # If implicit locking is used locking objects is recursive, that is
>>> # associated objects are also locked.
>>> # If ImplicitLocking is set to false, no locks are obtained in OQL
>>> # queries and there is also no recursive locking.
>>> ImplicitLocking=true
>>> #ImplicitLocking=false
>>> #
>>> #
>>> # The LockServletUrl entry points to the Lockserver servlet.
>>> # This Servlet is addressed by all distributed JVMs if the 
>>> RemoteLockMapImpl
>>> # is used.
>>> LockServletUrl=http://127.0.0.1:8080/ojb-lockserver
>>> #
>>> #
>>> # The LockAssociations entry defines the behaviour for the OJB
>>> # implicit locking feature. If set to WRITE (default) acquiring a write-
>>> # lock on a given object x implies write locks on all objects associated
>>> # to x. If set to READ implicit read-locks are acquired.
>>> # Acquiring a read-lock on x thus allways results in implicit read-locks
>>> # on all associated objects.
>>> #LockAssociations=READ
>>> LockAssociations=WRITE
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Logging
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The LoggerClass entry tells OJB which concrete Logger
>>> # implementation is to be used.
>>> #
>>> # Commons-logging
>>> #LoggerClass=org.apache.ojb.broker.util.logging.CommonsLoggerImpl
>>> # log4j based logging
>>> #eusoda
>>> LoggerClass=org.apache.ojb.broker.util.logging.Log4jLoggerImpl
>>> # OJB's own simple looging support
>>> #LoggerClass=org.apache.ojb.broker.util.logging.PoorMansLoggerImpl
>>> LoggerConfigFile=log4j.properties
>>> #
>>> # The LogLevel entries tells OJB which LogLevels are active
>>> # for the different loggers used within OJB
>>> # Loglevels: DEBUG < INFO < WARN < ERROR < FATAL
>>> # That is loglevel WARN won't log DEBUG and INFO messages,
>>> # but will log WARN, ERROR, and FATAL messages
>>> #
>>> # Global default log level used for all logging
>>> # entities if not specified
>>> ROOT.LogLevel=ERROR
>>> #
>>> # The Default Logger instance used within OJB
>>> DEFAULT.LogLevel=WARN
>>> # Logger for PersistenceBrokerImpl class
>>> org.apache.ojb.broker.core.PersistenceBrokerImpl.LogLevel=WARN
>>> # Logger for PersistenceBrokerFactory class 
>>> PersistenceBrokerFactoryDefaultImpl
>>> org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.LogLevel=WARN 
>>>
>>> # Logger for RepositoryXmlHandler, useful for debugging parsing of 
>>> repository.xml!
>>> # persistence capable object metadata
>>> org.apache.ojb.broker.metadata.RepositoryXmlHandler.LogLevel=WARN
>>> # Logger for ConnectionDescriptorXmlHandler, useful for debugging 
>>> parsing of repository.xml!
>>> # connection specific metadata
>>> org.apache.ojb.broker.metadata.ConnectionDescriptorXmlHandler.LogLevel=WARN 
>>>
>>> # Logger for JdbcAccess, useful for debugging JDBC related problems
>>> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.LogLevel=WARN
>>> # Logger for RsIterator, useful for debugging problems with Object 
>>> materialization
>>> org.apache.ojb.broker.accesslayer.RsIterator.LogLevel=WARN
>>> # Logger for StatementsForClass, useful for debugging JDBC Connection 
>>> related problems
>>> org.apache.ojb.broker.accesslayer.StatementsForClassImpl.LogLevel=WARN
>>> # Logger for SqlGenerator, useful for debugging generation of SQL
>>> org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.LogLevel=WARN 
>>>
>>> # Logger for RepositoryPersistor
>>> org.apache.ojb.broker.metadata.RepositoryPersistor.LogLevel=WARN
>>> # Logger for ConnectionFactory base class
>>> org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.LogLevel=WARN 
>>>
>>> # Logger for ConnectionManager
>>> org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.LogLevel=WARN
>>> #
>>> # Special Logger categories used in test suite and tutorials
>>> #
>>> # Logger for the ODMG Implementation
>>> ODMG.LogLevel=DEBUG
>>> # Logger for the JDO RI Implementation
>>> JDO.LogLevel=DEBUG
>>> # Logger for the performance tests
>>> performance.LogLevel=INFO
>>> # Logger for the soda api
>>> soda.LogLevel=WARN
>>> # Logger for the factory service
>>> ConfigurableFactory.LogLevel=WARN
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # OQL / SQL settings
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The OqlCollectionClass entry defines the collection type returned
>>> # from OQL queries. By default this value is set to DListImpl.
>>> # This will be good for most situations as DList allows maximum 
>>> flexibility
>>> # in a ODMG environment. See also section 'ODMG settings'.
>>> # Using DLists for large resultsets may be bad for application 
>>> performance.
>>> # For these scenarios you can use ArrayLists or Vectors.
>>> # Important note: the collections class to be used MUST implement the
>>> # interface org.apache.ojb.broker.ManageableCollection.
>>> #
>>> OqlCollectionClass=org.apache.ojb.odmg.collections.DListImpl_2
>>> # 
>>> OqlCollectionClass=org.apache.ojb.broker.util.collections.ManageableArrayList 
>>>
>>> # OqlCollectionClass=org.apache.ojb.broker.util.ManageableVector
>>> #
>>> # The SqlInLimit entry limits the number of values in IN-sql statement,
>>> # -1 for no limits. This hint is used in Criteria.
>>> SqlInLimit=200
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # ODMG settings
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Used ODMG collection implementation classes
>>> # (e.g. when do a Implementation#newDlist() call)
>>> #
>>> # org.odmg.DList implementation class
>>> DListClass=org.apache.ojb.odmg.collections.DListImpl_2
>>> #DListClass=org.apache.ojb.odmg.collections.DListImpl
>>> #
>>> # org.odmg.DArray implementation class
>>> DArrayClass=org.apache.ojb.odmg.collections.DListImpl_2
>>> #DArrayClass=org.apache.ojb.odmg.collections.DListImpl
>>> #
>>> # org.odmg.DMap implementation class
>>> DMapClass=org.apache.ojb.odmg.collections.DMapImpl
>>> #
>>> # org.odmg.DBag implementation class
>>> DBagClass=org.apache.ojb.odmg.collections.DBagImpl
>>> #
>>> # org.odmg.DSet implementation class
>>> DSetClass=org.apache.ojb.odmg.collections.DSetImpl
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Meta data / mapping settings
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The PersistentFieldClass property defines the implementation class
>>> # for PersistentField attributes used in the OJB MetaData layer.
>>> # By default the best performing attribute/refection based 
>>> implementation
>>> # is selected (PersistentFieldDirectAccessImpl).
>>> #
>>> # - PersistentFieldDirectAccessImpl
>>> #   is a high-speed version of the access strategies.
>>> #   It does not cooperate with an AccessController,
>>> #   but accesses the fields directly. Persistent
>>> #   attributes don't need getters and setters
>>> #   and don't have to be declared public or protected
>>> # - PersistentFieldPrivilegedImpl
>>> #   Same as above, but does cooperate with AccessController and do not
>>> #   suppress the java language access check.
>>> # - PersistentFieldIntrospectorImpl
>>> #   uses JavaBeans compliant calls only to access persistent attributes.
>>> #   No Reflection is needed. But for each attribute xxx there must be
>>> #   public getXxx() and setXxx() methods.
>>> # - PersistentFieldDynaBeanAccessImpl
>>> #   implementation used to access a property from a
>>> #   org.apache.commons.beanutils.DynaBean.
>>> # - PersistentFieldAutoProxyImpl
>>> #   for each field determines upon first access how to access this 
>>> particular field
>>> #   (directly, as a bean, as a dyna bean) and then uses that strategy
>>> #
>>> PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl 
>>>
>>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldPrivilegedImpl 
>>>
>>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldIntrospectorImpl 
>>>
>>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDynaBeanAccessImpl 
>>>
>>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldAutoProxyImpl 
>>>
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Component Intercepting for Profiling and Tracing
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # By enabling an InterceptorClass all OJB components will use
>>> # this Interceptor. Interceptors allow advanced tracing and Profiling
>>> # of all component method calls.
>>> # This is currently an experimental feature useful only for OJB 
>>> kernel developers.
>>> #
>>> #InterceptorClass=org.apache.ojb.broker.util.interceptor.TracingInterceptor 
>>>
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Transaction Management and assocation
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Use the LocalTxManager if you want the transaction to be associated 
>>> by a thread
>>> #OJBTxManagerClass=org.apache.ojb.odmg.LocalTxManager
>>> # Use the JTATxManager if you want the transaction to be associated 
>>> via the Transaction
>>> # manager that is in your application server.
>>> #eusoda
>>> OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
>>> #
>>> # The TransactionManager is acquired in different ways dependent on 
>>> the application server.
>>> # The JTATransactionManagerClass property allows you to specify the 
>>> class that implements
>>> # the proper behaviour for finding the transaction manager. Only use 
>>> when OJBTxManagerClass
>>> # is set to a factory that uses the application server transaction 
>>> manager
>>> # (org.apache.ojb.odmg.JTATxManager)
>>> #
>>> # JBoss Transaction Manager Factory
>>> JTATransactionManagerClass=org.apache.ojb.odmg.transaction.JBossTransactionManagerFactory 
>>>
>>> # Weblogic Transaction Manager Factory
>>> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.WeblogicTransactionManagerFactory 
>>>
>>> # WebSphere transaction manager factory
>>> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.WebSphereTransactionManagerFactory 
>>>
>>> # Orion transaction manager factory
>>> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.OrionTransactionManagerFactory 
>>>
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # End of OJB.properties file
>>> #---------------------------------------------------------------------------------------- 
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: auto-delete does not work anymore: rc6???

Posted by abo <ab...@online.de>.
thank you armin, I will check it out

regards
andreas

Armin Waibel wrote:

> Hi again,
>
> the fix is in CVS. Now should the new auto-xxx really backward 
> compatible and should be handled in a way described in
> http://db.apache.org/ojb/tutorial3.html#1:1%20auto-xxx%20setting
>
> regards,
> Armin
>
> Andreas Bohnert wrote:
>
>> hi armin,
>>
>>
>> that was a good suggestion! I don't change the meta data at runtime, 
>> but it seems that my auto-delete='false' is replaced (because it's 
>> now deprecated) with an auto-delete='object',
>> but it should be replaced with 'none'! well, that what I would 
>> excpect ;)
>>
>> thats what I got:
>>
>> <reference-descriptor
>>        name="contact"
>>        class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>>        auto-retrieve="true"
>>        auto-update="object"
>>        auto-delete="object"
>>      >
>>        <foreignkey field-ref="contactId"/>
>>      </reference-descriptor>
>>
>> and that is what it should be
>>
>>  <reference-descriptor
>>   name="contact"
>>   auto-retrieve="true"
>>   auto-update="true"
>>   auto-delete="false"
>>   class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>>  >
>>   <foreignkey field-ref="contactId"/>
>> </reference-descriptor>
>>
>> regards
>> andreas
>>
>> Armin Waibel wrote:
>>
>>> Hi Andreas,
>>>
>>> your code seems ok. Do you manipulate metadata at runtime? Maybe the 
>>> auto-delete flag change at runtime. Can you check this in your 
>>> deleteValidate(...)-method
>>>
>>> Collection ords = 
>>> broker.getClassDescriptor(Repository.class).getObjectReferenceDescriptors(); 
>>>
>>> for(Iterator iterator = ords.iterator(); iterator.hasNext();)
>>> {
>>>    String str = ((ObjectReferenceDescriptor) iterator.next()).toXML();
>>>    System.out.println(str);
>>> }
>>>
>>> and check if the auto-delete is really false (false == 17, true == 23)
>>>
>>> regards,
>>> Armin
>>>
>>> Andreas Bohnert wrote:
>>>
>>>> hello armin,
>>>>
>>>> yes, I did replace the repository.dtd.
>>>> I just simplified my application source. Here is the client/server 
>>>> code that produce the wrong deletes.
>>>> I'm using jboss 3.2.3 and postgresql 7.4.1.
>>>> the repository files and the database structure is attached.
>>>>
>>>> it's strange, because I think, the ojb junit testcase should cover 
>>>> this situation, and it's also strange, that no one else complained
>>>> thanks,
>>>> andreas
>>>>
>>>> ejb code:
>>>> /**
>>>>     * @ejb:interface-method
>>>>     */
>>>>    public void deleteValidate(Class dClass, Criteria crit) throws 
>>>> Exception {
>>>>        PersistenceBroker broker = getBroker();
>>>>        Object o = null;
>>>>        try {
>>>>            Query query = QueryFactory.newQuery( dClass, crit, false 
>>>> );                      o = broker.getObjectByQuery(query);
>>>>            log.debug("object to delete: "+o);
>>>>            broker.delete( o );
>>>>        } catch (PersistenceBrokerException e) {
>>>>            log.error("object could not be deleted: " + o);
>>>>            throw new Exception(e);
>>>>        }
>>>>        broker.close();
>>>>    }
>>>>   client code:
>>>>    public void deleteValidateClient() {
>>>>        Criteria crit = new Criteria();
>>>>        crit.addEqualTo("institution_contact_id", new 
>>>> Integer(1049080));
>>>>        try {
>>>>            OJBSessionRemote ojb = OjbUtil.getOJBSessionRemote();
>>>>            ojb.deleteValidate( Institution_Contact.class, crit );
>>>>        } catch (OJBLayerExc e) {
>>>>            e.printStackTrace();
>>>>        } catch (RemoteException e) {
>>>>            e.printStackTrace();
>>>>        } catch (Exception e) {
>>>>            e.printStackTrace();
>>>>        }
>>>>    }
>>>>
>>>> this is the resulting spy.log:
>>>> 1080640877421|15|0|statement|DELETE FROM institution_contact WHERE 
>>>> institution_contact_id = ? |DELETE FROM institution_contact WHERE 
>>>> institution_contact_id = '1049080'
>>>> 1080640877421|0|0|statement|DELETE FROM contact WHERE contact_id = 
>>>> ? |DELETE FROM contact WHERE contact_id = '1049040'
>>>> 1080640877437|0|0|statement|DELETE FROM institution WHERE 
>>>> institution_id = ? |DELETE FROM institution WHERE institution_id = 
>>>> '1048857'
>>>>
>>>>
>>>>
>>>>
>>>>  >Hi Andreas,
>>>>
>>>>  >I made a quick test. It works for me. Did you replace the 
>>>> repository.dtd?
>>>>  >Can you post the source code snip?
>>>>
>>>>  >regards,
>>>>  >Armin
>>>>
>>>>
>>>>
>>>> Andreas Bohnert wrote:
>>>>
>>>>>
>>>>>
>>>>> hello everbody,
>>>>>
>>>>> today I checked out the rc6 cvs version and did some validation 
>>>>> tests on my application.
>>>>> I found out, that there is something going wrong, when I delete an 
>>>>> object.
>>>>>
>>>>> I have an decomposed n-m relation:
>>>>>
>>>>> CONTACT --------INSTITUTION_CONTACT ------- INSTITUTION
>>>>>
>>>>> when I delete an INSTITUTION_CONTACT the related INSTITUTION and 
>>>>> the CONTACT are deleted as well!!
>>>>> I have put an auto-delete=false in my metadata, so I don't see a 
>>>>> reason for that action.
>>>>>
>>>>> here is the metadata for INSTITUTION_CONTACT :
>>>>> class-descriptor
>>>>> class="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>>>>> table="institution_contact"
>>>>>
>>>>>>
>>>>> <field-descriptor id="0"
>>>>>   name="institutionContactId"
>>>>>   column="institution_contact_id"
>>>>>   jdbc-type="INTEGER"
>>>>>   primarykey="true"
>>>>>   autoincrement="true"
>>>>> />
>>>>> <field-descriptor id="1"
>>>>>   name="contactId"
>>>>>   column="contact_id"
>>>>>   jdbc-type="INTEGER"
>>>>> />
>>>>> <field-descriptor id="2"
>>>>>   name="institutionId"
>>>>>   column="institution_id"
>>>>>   jdbc-type="INTEGER"
>>>>> />
>>>>> <field-descriptor id="3"
>>>>>   name="isPublic"
>>>>>   column="isPublic"
>>>>>   jdbc-type="TINYINT"
>>>>> />
>>>>> <field-descriptor id="4"
>>>>>   name="contactPrivileges"
>>>>>   column="contactPrivileges"
>>>>>   jdbc-type="INTEGER"
>>>>> />
>>>>> <field-descriptor id="5"
>>>>>   name="sortHelp"
>>>>>   column="sortHelp"
>>>>>   jdbc-type="INTEGER"
>>>>> />
>>>>> <field-descriptor id="6"
>>>>>   name="updateTime"
>>>>>   column="updateTime"
>>>>>   jdbc-type="TIMESTAMP"
>>>>> />
>>>>>
>>>>>   <reference-descriptor
>>>>>    name="contact"
>>>>>    auto-retrieve="true"
>>>>>    auto-update="true"
>>>>>    auto-delete="false"
>>>>>    class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>>>>> >
>>>>>    <foreignkey field-ref="contactId"/>
>>>>> </reference-descriptor>
>>>>>
>>>>>   <reference-descriptor
>>>>>    name="institution"
>>>>>    auto-retrieve="true"
>>>>>    auto-update="true"
>>>>>    auto-delete="false"
>>>>>    class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>>>> >
>>>>>    <foreignkey field-ref="institutionId"/>
>>>>> </reference-descriptor>
>>>>>
>>>>>
>>>>> </class-descriptor>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------ 
>>>>
>>>>
>>>> <class-descriptor
>>>>   class="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>>>>   table="institution_contact"
>>>>
>>>>   <field-descriptor id="0"
>>>>     name="institutionContactId"
>>>>     column="institution_contact_id"
>>>>     jdbc-type="INTEGER"
>>>>     primarykey="true"
>>>>     autoincrement="true"
>>>>   />
>>>>   <field-descriptor id="1"
>>>>     name="contactId"
>>>>     column="contact_id"
>>>>     jdbc-type="INTEGER"
>>>>   />
>>>>   <field-descriptor id="2"
>>>>     name="institutionId"
>>>>     column="institution_id"
>>>>     jdbc-type="INTEGER"
>>>>   />
>>>>   <field-descriptor id="3"
>>>>     name="isPublic"
>>>>     column="isPublic"
>>>>     jdbc-type="TINYINT"
>>>>   />
>>>>   <field-descriptor id="4"
>>>>     name="contactPrivileges"
>>>>     column="contactPrivileges"
>>>>     jdbc-type="INTEGER"
>>>>   />
>>>>   <field-descriptor id="5"
>>>>     name="sortHelp"
>>>>     column="sortHelp"
>>>>     jdbc-type="INTEGER"
>>>>   />
>>>>   <field-descriptor id="6"
>>>>     name="updateTime"
>>>>     column="updateTime"
>>>>     jdbc-type="TIMESTAMP"
>>>>   />
>>>>
>>>>     <reference-descriptor
>>>>      name="contact"
>>>>      auto-retrieve="true"
>>>>      auto-update="true"
>>>>      auto-delete="false"
>>>>      class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>>>>   >
>>>>      <foreignkey field-ref="contactId"/>
>>>>   </reference-descriptor>
>>>>
>>>>     <reference-descriptor
>>>>      name="institution"
>>>>      auto-retrieve="true"
>>>>      auto-update="true"
>>>>      auto-delete="false"
>>>>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>>>   >
>>>>      <foreignkey field-ref="institutionId"/>
>>>>   </reference-descriptor>
>>>>
>>>>
>>>> </class-descriptor>
>>>>
>>>>
>>>> <class-descriptor
>>>>   class="at.weberhofer.eusoda.shared.orm.Contact"
>>>>   table="contact"
>>>>
>>>>   <field-descriptor id="1"
>>>>     name="contactId"
>>>>     column="contact_id"
>>>>     jdbc-type="INTEGER"
>>>>     primarykey="true"
>>>>     autoincrement="true"
>>>>   />
>>>>   <field-descriptor id="2"
>>>>     name="genderAppResKeyId"
>>>>     column="genderAppResKey_id"
>>>>     jdbc-type="INTEGER"
>>>>   />
>>>>   <field-descriptor id="3"
>>>>     name="descUserResKeyId"
>>>>     column="descUserResKey_id"
>>>>     jdbc-type="INTEGER"
>>>>   />
>>>>   <field-descriptor id="4"
>>>>     name="updateContactId"
>>>>     column="updateContact_id"
>>>>     jdbc-type="INTEGER"
>>>>   />
>>>>   <field-descriptor id="5"
>>>>     name="salutation"
>>>>     column="salutation"
>>>>     jdbc-type="VARCHAR"
>>>>   />
>>>>   <field-descriptor id="6"
>>>>     name="academicTitle"
>>>>     column="academicTitle"
>>>>     jdbc-type="VARCHAR"
>>>>   />
>>>>   <field-descriptor id="7"
>>>>     name="functionalTitle"
>>>>     column="functionalTitle"
>>>>     jdbc-type="VARCHAR"
>>>>   />
>>>>   <field-descriptor id="8"
>>>>     name="firstName"
>>>>     column="firstName"
>>>>     jdbc-type="VARCHAR"
>>>>   />
>>>>   <field-descriptor id="9"
>>>>     name="lastName"
>>>>     column="lastName"
>>>>     jdbc-type="VARCHAR"
>>>>   />
>>>>   <field-descriptor id="10"
>>>>     name="profession"
>>>>     column="profession"
>>>>     jdbc-type="VARCHAR"
>>>>   />
>>>>   <field-descriptor id="11"
>>>>     name="login"
>>>>     column="login"
>>>>     jdbc-type="VARCHAR"
>>>>   />
>>>>   <field-descriptor id="12"
>>>>     name="pwd"
>>>>     column="pwd"
>>>>     jdbc-type="VARCHAR"
>>>>   />
>>>>   <field-descriptor id="13"
>>>>     name="isRemoved"
>>>>     column="isRemoved"
>>>>     jdbc-type="TINYINT"
>>>>   />
>>>>   <field-descriptor id="14"
>>>>     name="isPopup"
>>>>     column="isPopup"
>>>>     jdbc-type="TINYINT"
>>>>   />
>>>>   <field-descriptor id="15"
>>>>     name="updateTime"
>>>>     column="updateTime"
>>>>     jdbc-type="TIMESTAMP"
>>>>   />
>>>>
>>>>   <reference-descriptor
>>>>      name="descUserResKey"
>>>>      auto-retrieve="false"
>>>>      auto-update="true"
>>>>      auto-delete="true"
>>>>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>>>>   >
>>>>      <foreignkey field-ref="descUserResKeyId"/>
>>>>   </reference-descriptor>
>>>>
>>>>   <reference-descriptor
>>>>      name="genderAppResKey"
>>>>      auto-retrieve="false"
>>>>      auto-update="false"
>>>>      auto-delete="false"
>>>>      class-ref="at.weberhofer.eusoda.shared.orm.AppResKey"
>>>>   >
>>>>      <foreignkey field-ref="genderAppResKeyId"/>
>>>>   </reference-descriptor>
>>>>
>>>>   <collection-descriptor
>>>>          name="institutionContacts"
>>>>          
>>>> element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Contact" 
>>>>
>>>>          auto-retrieve="false"
>>>>          auto-update="false"
>>>>          auto-delete="false"
>>>>       >
>>>>       <inverse-foreignkey field-ref="contactId"/>
>>>>   </collection-descriptor>
>>>>
>>>>   <collection-descriptor
>>>>          name="contactAppResKey"
>>>>          
>>>> element-class-ref="at.weberhofer.eusoda.shared.orm.Contact_AppResKey"
>>>>          auto-retrieve="true"
>>>>          auto-update="true"
>>>>          auto-delete="false"
>>>>       >
>>>>       <inverse-foreignkey field-ref="contactId"/>
>>>>   </collection-descriptor>
>>>>
>>>>   <collection-descriptor
>>>>      name="contactRegions"
>>>>      
>>>> element-class-ref="at.weberhofer.eusoda.shared.orm.Contact_Region"
>>>>      auto-retrieve="false"
>>>>      auto-update="false"
>>>>      auto-delete="false"
>>>>      >
>>>>      <inverse-foreignkey field-ref="contactId"/>
>>>>   </collection-descriptor>
>>>>
>>>> </class-descriptor>
>>>>
>>>> <class-descriptor
>>>>   class="at.weberhofer.eusoda.shared.orm.Institution"
>>>>   table="institution"
>>>>
>>>>   <field-descriptor id="1"
>>>>     name="institutionId"
>>>>     column="institution_id"
>>>>     jdbc-type="INTEGER"
>>>>     primarykey="true"
>>>>     autoincrement="true"
>>>>   />
>>>>   <field-descriptor id="2"
>>>>     name="topInstitutionId"
>>>>     column="topInstitution_id"
>>>>     jdbc-type="INTEGER"
>>>>   />
>>>>   <field-descriptor id="3"
>>>>     name="umbrellaInstitutionId"
>>>>     column="umbrellaInstitution_id"
>>>>     jdbc-type="INTEGER"
>>>>   />
>>>>   <field-descriptor id="4"
>>>>     name="createContactId"
>>>>     column="createContact_id"
>>>>     jdbc-type="INTEGER"
>>>>   />
>>>>   <field-descriptor id="5"
>>>>     name="updateContactId"
>>>>     column="updateContact_id"
>>>>     jdbc-type="INTEGER"
>>>>   />
>>>>   <field-descriptor id="6"
>>>>     name="instDescUserResKeyId"
>>>>     column="instDescUserResKey_id"
>>>>     jdbc-type="INTEGER"
>>>>   />
>>>>   <field-descriptor id="7"
>>>>     name="businessHoursUserResKeyId"
>>>>     column="businessHoursUserResKey_id"
>>>>     jdbc-type="INTEGER"
>>>>   />
>>>>   <field-descriptor id="8"
>>>>     name="instTypeAppResKeyId"
>>>>     column="instTypeAppResKey_id"
>>>>     jdbc-type="INTEGER"
>>>>   />
>>>>   <field-descriptor id="9"
>>>>     name="institution1"
>>>>     column="institution1"
>>>>     jdbc-type="VARCHAR"
>>>>   />
>>>>   <field-descriptor id="10"
>>>>     name="institution2"
>>>>     column="institution2"
>>>>     jdbc-type="VARCHAR"
>>>>   />
>>>>   <field-descriptor id="11"
>>>>     name="isPublic"
>>>>     column="isPublic"
>>>>     jdbc-type="TINYINT"
>>>>   />
>>>>   <field-descriptor id="12"
>>>>     name="infoInternal"
>>>>     column="infoInternal"
>>>>     jdbc-type="VARCHAR"
>>>>   />
>>>>   <field-descriptor id="13"
>>>>     name="foundationDate"
>>>>     column="foundationDate"
>>>>     jdbc-type="TIMESTAMP"
>>>>   />
>>>>   <field-descriptor id="14"
>>>>     name="sortHelp"
>>>>     column="sortHelp"
>>>>     jdbc-type="SMALLINT"
>>>>   />
>>>>   <field-descriptor id="15"
>>>>     name="isUmbrella"
>>>>     column="isUmbrella"
>>>>     jdbc-type="TINYINT"
>>>>   />
>>>>   <field-descriptor id="16"
>>>>     name="isRemoved"
>>>>     column="isRemoved"
>>>>     jdbc-type="TINYINT"
>>>>   />
>>>>   <field-descriptor id="17"
>>>>     name="createTime"
>>>>     column="createTime"
>>>>     jdbc-type="TIMESTAMP"
>>>>   />
>>>>   <field-descriptor id="18"
>>>>     name="updateTime"
>>>>     column="updateTime"
>>>>     jdbc-type="TIMESTAMP"
>>>>   />
>>>>
>>>>   <reference-descriptor
>>>>      name="instDescUserResKey"
>>>>      auto-retrieve="false"
>>>>      auto-update="true"
>>>>      auto-delete="true"
>>>>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>>>>      >
>>>>      <foreignkey field-ref="instDescUserResKeyId"/>
>>>>   </reference-descriptor>
>>>>
>>>>   <reference-descriptor
>>>>      name="businessHoursUserResKey"
>>>>      auto-retrieve="false"
>>>>      auto-update="true"
>>>>      auto-delete="true"
>>>>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>>>>      >
>>>>      <foreignkey field-ref="businessHoursUserResKeyId"/>
>>>>   </reference-descriptor>
>>>>
>>>>   <reference-descriptor
>>>>      name="instTypeAppResKey"
>>>>      auto-retrieve="false"
>>>>      auto-update="false"
>>>>      auto-delete="false"
>>>>      class-ref="at.weberhofer.eusoda.shared.orm.AppResKey"
>>>>      >
>>>>      <foreignkey field-ref="instTypeAppResKeyId"/>
>>>>   </reference-descriptor>
>>>>
>>>>   <reference-descriptor
>>>>      name="topInstitution"
>>>>      auto-retrieve="true"
>>>>      auto-update="true"
>>>>      auto-delete="false"
>>>>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>>>      >
>>>>      <foreignkey field-ref="topInstitutionId"/>
>>>>   </reference-descriptor>
>>>>
>>>>   <reference-descriptor
>>>>      name="umbrellaInstitution"
>>>>      auto-retrieve="true"
>>>>      auto-update="true"
>>>>      auto-delete="false"
>>>>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>>>      >
>>>>      <foreignkey field-ref="umbrellaInstitutionId"/>
>>>>   </reference-descriptor>
>>>>
>>>>   <collection-descriptor
>>>>      name="institutionRegions"
>>>>      
>>>> element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Region"
>>>>      auto-retrieve="false"
>>>>      auto-update="true"
>>>>      auto-delete="false"
>>>>      >
>>>>      <inverse-foreignkey field-ref="institutionId"/>
>>>>   </collection-descriptor>
>>>>
>>>>   <collection-descriptor
>>>>          name="institutionContacts"
>>>>          
>>>> element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Contact" 
>>>>
>>>>          auto-retrieve="false"
>>>>          auto-update="false"
>>>>          auto-delete="false"
>>>>       >
>>>>       <inverse-foreignkey field-ref="institutionId"/>
>>>>   </collection-descriptor>
>>>>
>>>> </class-descriptor>
>>>>
>>>>
>>>> ------------------------------------------------------------------------ 
>>>>
>>>>
>>>> CREATE TABLE institution (
>>>>     institution_id integer DEFAULT 0 NOT NULL,
>>>>     topinstitution_id integer DEFAULT 0 NOT NULL,
>>>>     umbrellainstitution_id integer DEFAULT 0 NOT NULL,
>>>>     createcontact_id integer DEFAULT 0 NOT NULL,
>>>>     updatecontact_id integer DEFAULT 0 NOT NULL,
>>>>     instdescuserreskey_id integer DEFAULT 0 NOT NULL,
>>>>     businesshoursuserreskey_id integer DEFAULT 0 NOT NULL,
>>>>     insttypeappreskey_id integer DEFAULT 0 NOT NULL,
>>>>     institution1 character varying(120) DEFAULT ''::character 
>>>> varying NOT NULL,
>>>>     institution2 character varying(120) DEFAULT ''::character 
>>>> varying NOT NULL,
>>>>     ispublic smallint DEFAULT (1)::smallint NOT NULL,
>>>>     infointernal character varying(255) DEFAULT ''::character 
>>>> varying NOT NULL,
>>>>     foundationdate timestamp without time zone DEFAULT '0001-01-01 
>>>> 00:00:00'::timestamp without time zone,
>>>>     sorthelp smallint DEFAULT (0)::smallint NOT NULL,
>>>>     isumbrella smallint DEFAULT (0)::smallint NOT NULL,
>>>>     isremoved smallint DEFAULT (0)::smallint NOT NULL,
>>>>     createtime timestamp without time zone DEFAULT '0001-01-01 
>>>> 00:00:00'::timestamp without time zone NOT NULL,
>>>>     updatetime timestamp without time zone DEFAULT '0001-01-01 
>>>> 00:00:00'::timestamp without time zone NOT NULL
>>>> );
>>>>
>>>> ALTER TABLE ONLY institution
>>>>     ADD CONSTRAINT institution_pkey PRIMARY KEY (institution_id);
>>>>
>>>>
>>>>
>>>>
>>>> CREATE TABLE contact (
>>>>     contact_id integer DEFAULT 0 NOT NULL,
>>>>     descuserreskey_id integer DEFAULT 0 NOT NULL,
>>>>     updatecontact_id integer DEFAULT 0 NOT NULL,
>>>>     genderappreskey_id integer DEFAULT 0 NOT NULL,
>>>>     salutation character varying(80) DEFAULT ''::character varying 
>>>> NOT NULL,
>>>>     academictitle character varying(80) DEFAULT ''::character 
>>>> varying NOT NULL,
>>>>     functionaltitle character varying(80) DEFAULT ''::character 
>>>> varying NOT NULL,
>>>>     firstname character varying(80) DEFAULT ''::character varying 
>>>> NOT NULL,
>>>>     lastname character varying(80) DEFAULT ''::character varying 
>>>> NOT NULL,
>>>>     profession character varying(255) DEFAULT ''::character varying 
>>>> NOT NULL,
>>>>     login character varying(10) DEFAULT ''::character varying NOT 
>>>> NULL,
>>>>     pwd character varying(80) DEFAULT ''::character varying NOT NULL,
>>>>     isremoved smallint DEFAULT (0)::smallint NOT NULL,
>>>>     updatetime timestamp without time zone DEFAULT '0001-01-01 
>>>> 00:00:00'::timestamp without time zone NOT NULL,
>>>>     ispopup smallint DEFAULT 0
>>>> );
>>>>
>>>> ALTER TABLE ONLY contact
>>>>     ADD CONSTRAINT contact_pkey PRIMARY KEY (contact_id);
>>>>
>>>>
>>>>
>>>> CREATE TABLE institution_contact (
>>>>     institution_contact_id integer DEFAULT 0 NOT NULL,
>>>>     contact_id integer DEFAULT 0 NOT NULL,
>>>>     institution_id integer DEFAULT 0 NOT NULL,
>>>>     contactprivileges integer DEFAULT 0 NOT NULL,
>>>>     ispublic smallint,
>>>>     sorthelp integer DEFAULT 0 NOT NULL,
>>>>     updatetime timestamp without time zone DEFAULT '0001-01-01 
>>>> 00:00:00'::timestamp without time zone NOT NULL
>>>> );
>>>>
>>>> ALTER TABLE ONLY institution_contact
>>>>     ADD CONSTRAINT institution_contact_pkey PRIMARY KEY 
>>>> (institution_contact_id);
>>>>
>>>>
>>>> INSERT INTO institution VALUES (1048857, 1048817, 0, 0, 1, 1050040, 
>>>> 1050041, 40, 'Ebay', '', 1, 'internal', NULL, 0, 1, 0, '2004-03-22 
>>>> 16:03:25.609', '2004-03-30 11:48:29.046');
>>>> INSERT INTO contact VALUES (1049040, 0, 1, 35, '', '', '', '', 
>>>> 'deleteUser', '', 'du', '13A014CB9DE9F7CAD88D5DAFB70ECB41', 0, 
>>>> '2004-03-30 11:48:08.265', 0);
>>>> INSERT INTO institution_contact VALUES (1049080, 1049040, 1048857, 
>>>> 1, 0, 0, '2004-03-30 11:48:29.046');
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------ 
>>>>
>>>>
>>>> # OJB.properties -- configuration of the OJB runtime environment
>>>> # Version: 1.0
>>>> # (c) 2001, 2002, 2003 Apache Software Foundation
>>>> # Author: Thomas Mahler and many others
>>>> # @version $Id: OJB.properties,v 1.63 2004/03/24 13:58:01 tomdz Exp $
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # repository file settings
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # The repositoryFile entry tells OJB to use this file as as its 
>>>> standard mapping
>>>> # repository. The file is looked up from the classpath.
>>>> #
>>>> repositoryFile=repository.xml
>>>> #
>>>> # If the useSerializedRepository entry is set to true, OJB tries to 
>>>> load a
>>>> # serialized version of the repository for performance reasons.
>>>> # if set to false, OJB always loads the xml file.
>>>> # Setting this flag to true will accelerate the startup sequence of 
>>>> OJB.
>>>> # If set to true changes to the repository.xml file will only be 
>>>> detected
>>>> # after maually deleting the repository.xml.serialized file.
>>>> useSerializedRepository=false
>>>> #
>>>> # If Repository serialization is used the entry 
>>>> serializedRepositoryPath defines the
>>>> # directory where the Repository is written to and read from.
>>>> # this entry is used only when the useSerializedRepository flag is 
>>>> set to true
>>>> #
>>>> serializedRepositoryPath=.
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # PersistenceBrokerFactory / PersistenceBroker
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # The PersistenceBrokerFactoryClass entry decides which concrete
>>>> # PersistenceBrokerFactory implemention is to be used.
>>>> PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl 
>>>>
>>>> # If in managed environment *only* the PB-api was used it's 
>>>> recommended to use this factory
>>>> # to enable the PersistenceBroker instances to participate in the 
>>>> JTA transaction. This makes
>>>> # e.g. PBStateListener work properly in managed environments.
>>>> # eusoda
>>>> #PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl 
>>>>
>>>> #
>>>> #
>>>> # The PersistenceBrokerClass entry decides which concrete 
>>>> PersistenceBroker
>>>> # implementation is to be served by the PersistenceBrokerFactory.
>>>> # This is the singlevm implementation:
>>>> PersistenceBrokerClass=org.apache.ojb.broker.core.PersistenceBrokerImpl 
>>>>
>>>> #
>>>> # This is an implementation that uses Prevayler (prevayler.sf.net) 
>>>> as the persistent storage.
>>>> # Using this implementation OJB works as a simple OODBMS
>>>> #PersistenceBrokerClass=org.apache.ojb.broker.prevayler.PBPrevaylerImpl 
>>>>
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # PersistenceBroker pool
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # PersistenceBroker pool configuration
>>>> # This pool uses the jakarta-commons-pool api.
>>>> # There you can find things described in detail.
>>>> #
>>>> # maximum number of brokers that can be borrowed from the
>>>> # pool at one time. When non-positive, there is no limit.
>>>> maxActive=100
>>>> #
>>>> # controls the maximum number of brokers that can sit idle in the
>>>> # pool (per key) at any time. When non-positive, there is no limit
>>>> maxIdle=-1
>>>> #
>>>> # max time block to get broker instance from pool, after that 
>>>> exception is thrown.
>>>> # When non-positive, block till last judgement
>>>> maxWait=2000
>>>> #
>>>> # indicates how long the eviction thread should sleep before "runs" 
>>>> of examining
>>>> # idle objects. When non-positive, no eviction thread will be 
>>>> launched.
>>>> timeBetweenEvictionRunsMillis=-1
>>>> #
>>>> # specifies the minimum amount of time that an broker may sit idle
>>>> # in the pool before it is eligable for eviction due to idle time.
>>>> # When non-positive, no object will be dropped from the pool due
>>>> # to idle time alone (depends on timeBetweenEvictionRunsMillis > 0)
>>>> minEvictableIdleTimeMillis=1000000
>>>> #
>>>> # specifies the behaviour of the pool when broker capacity is
>>>> # exhausted (see maxActive above)
>>>> # 0 - fail
>>>> # 1 - block
>>>> # 2 - grow
>>>> whenExhaustedAction=0
>>>> #
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # ConnectionFactory / Default ConnectionPool
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # The ConnectionFactoryClass entry determines which kind of 
>>>> ConnectionFactory
>>>> # is to be used within org.apache.ojb as connection factory.
>>>> # A ConnectionFactory is responsible for creating
>>>> # JDBC Connections. Current version ships four implementations:
>>>> #
>>>> # 1. ConnectionFactoryNotPooledImpl
>>>> #    No pooling, no playing around.
>>>> #    Every connection request returns a new connection,
>>>> #    every connection release close the connection.
>>>> # 2. ConnectionFactoryPooledImpl
>>>> #    This implementation supports connection pooling.
>>>> # 3. ConnectionFactoryDBCPImpl
>>>> #    Using the jakarta-DBCP api for connection management, support
>>>> #    connection- and prepared statement-pooling, abandoned 
>>>> connection handling.
>>>> # 4. ConnectionFactoryManagedImpl
>>>> #    Connection factory for use within managed environments - e.g. 
>>>> JBoss.
>>>> #    Every obtained DataSource was wrapped within OJB (and ignore
>>>> #    e.g. con.commit() calls within OJB).
>>>> #    Use this implementation e.g if you use Datasources from an 
>>>> application server.
>>>> #
>>>> # Use the OJB performance tests to decide, which implementation is 
>>>> best for you.
>>>> # The proper way of obtaining a connection is configured in
>>>> # JDBCConnectionDescriptor entries in the repository.xml file.
>>>> # If want a more fine grained control of each connection pool used 
>>>> by OJB,
>>>> # take a look at the repository.dtd, there was a possibility to 
>>>> override
>>>> # this default connection factory entry in each 
>>>> JDBCConnectionDescriptor.
>>>> #
>>>> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl 
>>>>
>>>> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl 
>>>>
>>>> #eusoda
>>>> ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl 
>>>>
>>>> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl 
>>>>
>>>> #
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # ConnectionManager
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # The ConnectionManagerClass entry defines the ConnectionManager 
>>>> implemementation to be used
>>>> ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl 
>>>>
>>>> #
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # SqlGenerator
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # The SqlGeneratorClass entry defines the SqlGenerator 
>>>> implemementation to be used
>>>> SqlGeneratorClass=org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl 
>>>>
>>>> #
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # CollectionProxy class
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # The optional CollectionProxy entry defines the class to be used 
>>>> for CollectionProxies
>>>> # if this entry is null org.apache.ojb.broker.accesslayer.ListProxy 
>>>> is used for Lists
>>>> # and org.apache.ojb.broker.accesslayer.CollectionProxy for 
>>>> Collections
>>>> #
>>>> #CollectionProxyClass=
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # StatementManager
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # The StatementManagerClass entry defines the StatementManager 
>>>> implemementation to be used
>>>> StatementManagerClass=org.apache.ojb.broker.accesslayer.StatementManager 
>>>>
>>>> #
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # StatementsForClass
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # The StatementsForClassClass entry defines the StatementsForClass 
>>>> implemementation to be used
>>>> # to implement cached statements.
>>>> StatementsForClassClass=org.apache.ojb.broker.accesslayer.StatementsForClassImpl 
>>>>
>>>> #
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # JdbcAccess
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # The JdbcAccessClass entry defines the JdbcAccess implemementation 
>>>> to be used
>>>> JdbcAccessClass=org.apache.ojb.broker.accesslayer.JdbcAccessImpl
>>>> #
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # Object cache
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # The ObjectCacheClass entry tells OJB which concrete ObjectCache
>>>> # implementation is to be used as standard cache.
>>>> # Its also possible to override this entry adding object-cache 
>>>> elements
>>>> # on jdbc-connection-descriptor level and
>>>> # per class-descriptor in repository file. More info see 
>>>> documentation.
>>>> #
>>>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl
>>>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheEmptyImpl
>>>> #eusoda
>>>> ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
>>>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheJCSPerClassImpl 
>>>>
>>>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerClassImpl
>>>> #
>>>> #
>>>> # This property is only relevant if the per class-descriptor 
>>>> object-cache
>>>> # declaration was used in conjunction with metadata runtime changes.
>>>> # If set 'flase' the class name of the object is used
>>>> # to find a per class ObjectCache implementation.
>>>> # If set 'true' the ObjectCacheDescriptor instance is used as key to
>>>> # find a per class ObjectCache, this enables to use different 
>>>> ObjectCache
>>>> # instances for the same class.
>>>> descriptorBasedCaches=false
>>>> #
>>>> #
>>>> # Use CacheFilters to do filter operations before caching methods were
>>>> # called. Build your own filter class by implementing 
>>>> org.apache.ojb.cache.CacheFilter.
>>>> # It is possible to use a arbitrary number of CacheFilters, but 
>>>> this slows
>>>> # down the performance of the cache, thus handle with care.
>>>> #
>>>> # - org.apache.ojb.broker.cache.CacheFilterClassImpl
>>>> # allows filtering of classes
>>>> # - org.apache.ojb.broker.cache.CacheFilterPackageImpl
>>>> # allows filtering of packages
>>>> # More info see Javadoc of the according classes.
>>>> # Set a comma separated list of CacheFilter.
>>>> #ObjectCacheFilter=org.apache.ojb.broker.cache.CacheFilterClassImpl,org.apache.ojb.broker.cache.CacheFilterPackageImpl 
>>>>
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # Locking
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # The LockManagerClass entry tells OJB which concrete LockManager
>>>> # implementation is to be used.
>>>> LockManagerClass=org.apache.ojb.odmg.locking.LockManagerDefaultImpl
>>>> #
>>>> # The LockMapClass entry tells OJB which concrete LockMap
>>>> # implementation is to be used.
>>>> # If OJB is running on multiple concurrent clients it is recommended
>>>> # to use the RemoteLockMapImpl. It guarantees to provide
>>>> # Lockmanagement across multiple JVMs.
>>>> # This Implemenation relies on a Servlet based Lockserver. To use 
>>>> it you have to
>>>> # deploy the ojb-lockserver.war into a Servlet engine.
>>>> # and you have to set the Property LockServletUrl to point to this 
>>>> servlet.
>>>> # (see LockServletUrl section below).
>>>> # If OJB is running in a single JVM (e.g. in a desktop app, or in a 
>>>> servlet
>>>> # engine) it is save to use the InMemoryLockMapImpl. Using it will 
>>>> result
>>>> # in a large performance gain.
>>>> #LockMapClass=org.apache.ojb.odmg.locking.RemoteLockMapImpl
>>>> LockMapClass=org.apache.ojb.odmg.locking.InMemoryLockMapImpl
>>>> #
>>>> # The LockTimeout entry defines the maximum time in milliseconds
>>>> # that a lock may be hold. Defaults to 60000 = 1 minute
>>>> LockTimeout=60000
>>>> #
>>>> # The ImplicitLocking entry defines if implicit lock acquisition is
>>>> # to be used. If set to true OJB implicitely locks objects to ODMG
>>>> # transactions after performing OQL queries.
>>>> # If implicit locking is used locking objects is recursive, that is
>>>> # associated objects are also locked.
>>>> # If ImplicitLocking is set to false, no locks are obtained in OQL
>>>> # queries and there is also no recursive locking.
>>>> ImplicitLocking=true
>>>> #ImplicitLocking=false
>>>> #
>>>> #
>>>> # The LockServletUrl entry points to the Lockserver servlet.
>>>> # This Servlet is addressed by all distributed JVMs if the 
>>>> RemoteLockMapImpl
>>>> # is used.
>>>> LockServletUrl=http://127.0.0.1:8080/ojb-lockserver
>>>> #
>>>> #
>>>> # The LockAssociations entry defines the behaviour for the OJB
>>>> # implicit locking feature. If set to WRITE (default) acquiring a 
>>>> write-
>>>> # lock on a given object x implies write locks on all objects 
>>>> associated
>>>> # to x. If set to READ implicit read-locks are acquired.
>>>> # Acquiring a read-lock on x thus allways results in implicit 
>>>> read-locks
>>>> # on all associated objects.
>>>> #LockAssociations=READ
>>>> LockAssociations=WRITE
>>>> #
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # Logging
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # The LoggerClass entry tells OJB which concrete Logger
>>>> # implementation is to be used.
>>>> #
>>>> # Commons-logging
>>>> #LoggerClass=org.apache.ojb.broker.util.logging.CommonsLoggerImpl
>>>> # log4j based logging
>>>> #eusoda
>>>> LoggerClass=org.apache.ojb.broker.util.logging.Log4jLoggerImpl
>>>> # OJB's own simple looging support
>>>> #LoggerClass=org.apache.ojb.broker.util.logging.PoorMansLoggerImpl
>>>> LoggerConfigFile=log4j.properties
>>>> #
>>>> # The LogLevel entries tells OJB which LogLevels are active
>>>> # for the different loggers used within OJB
>>>> # Loglevels: DEBUG < INFO < WARN < ERROR < FATAL
>>>> # That is loglevel WARN won't log DEBUG and INFO messages,
>>>> # but will log WARN, ERROR, and FATAL messages
>>>> #
>>>> # Global default log level used for all logging
>>>> # entities if not specified
>>>> ROOT.LogLevel=ERROR
>>>> #
>>>> # The Default Logger instance used within OJB
>>>> DEFAULT.LogLevel=WARN
>>>> # Logger for PersistenceBrokerImpl class
>>>> org.apache.ojb.broker.core.PersistenceBrokerImpl.LogLevel=WARN
>>>> # Logger for PersistenceBrokerFactory class 
>>>> PersistenceBrokerFactoryDefaultImpl
>>>> org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.LogLevel=WARN 
>>>>
>>>> # Logger for RepositoryXmlHandler, useful for debugging parsing of 
>>>> repository.xml!
>>>> # persistence capable object metadata
>>>> org.apache.ojb.broker.metadata.RepositoryXmlHandler.LogLevel=WARN
>>>> # Logger for ConnectionDescriptorXmlHandler, useful for debugging 
>>>> parsing of repository.xml!
>>>> # connection specific metadata
>>>> org.apache.ojb.broker.metadata.ConnectionDescriptorXmlHandler.LogLevel=WARN 
>>>>
>>>> # Logger for JdbcAccess, useful for debugging JDBC related problems
>>>> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.LogLevel=WARN
>>>> # Logger for RsIterator, useful for debugging problems with Object 
>>>> materialization
>>>> org.apache.ojb.broker.accesslayer.RsIterator.LogLevel=WARN
>>>> # Logger for StatementsForClass, useful for debugging JDBC 
>>>> Connection related problems
>>>> org.apache.ojb.broker.accesslayer.StatementsForClassImpl.LogLevel=WARN
>>>> # Logger for SqlGenerator, useful for debugging generation of SQL
>>>> org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.LogLevel=WARN 
>>>>
>>>> # Logger for RepositoryPersistor
>>>> org.apache.ojb.broker.metadata.RepositoryPersistor.LogLevel=WARN
>>>> # Logger for ConnectionFactory base class
>>>> org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.LogLevel=WARN 
>>>>
>>>> # Logger for ConnectionManager
>>>> org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.LogLevel=WARN
>>>> #
>>>> # Special Logger categories used in test suite and tutorials
>>>> #
>>>> # Logger for the ODMG Implementation
>>>> ODMG.LogLevel=DEBUG
>>>> # Logger for the JDO RI Implementation
>>>> JDO.LogLevel=DEBUG
>>>> # Logger for the performance tests
>>>> performance.LogLevel=INFO
>>>> # Logger for the soda api
>>>> soda.LogLevel=WARN
>>>> # Logger for the factory service
>>>> ConfigurableFactory.LogLevel=WARN
>>>> #
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # OQL / SQL settings
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # The OqlCollectionClass entry defines the collection type returned
>>>> # from OQL queries. By default this value is set to DListImpl.
>>>> # This will be good for most situations as DList allows maximum 
>>>> flexibility
>>>> # in a ODMG environment. See also section 'ODMG settings'.
>>>> # Using DLists for large resultsets may be bad for application 
>>>> performance.
>>>> # For these scenarios you can use ArrayLists or Vectors.
>>>> # Important note: the collections class to be used MUST implement the
>>>> # interface org.apache.ojb.broker.ManageableCollection.
>>>> #
>>>> OqlCollectionClass=org.apache.ojb.odmg.collections.DListImpl_2
>>>> # 
>>>> OqlCollectionClass=org.apache.ojb.broker.util.collections.ManageableArrayList 
>>>>
>>>> # OqlCollectionClass=org.apache.ojb.broker.util.ManageableVector
>>>> #
>>>> # The SqlInLimit entry limits the number of values in IN-sql 
>>>> statement,
>>>> # -1 for no limits. This hint is used in Criteria.
>>>> SqlInLimit=200
>>>> #
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # ODMG settings
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # Used ODMG collection implementation classes
>>>> # (e.g. when do a Implementation#newDlist() call)
>>>> #
>>>> # org.odmg.DList implementation class
>>>> DListClass=org.apache.ojb.odmg.collections.DListImpl_2
>>>> #DListClass=org.apache.ojb.odmg.collections.DListImpl
>>>> #
>>>> # org.odmg.DArray implementation class
>>>> DArrayClass=org.apache.ojb.odmg.collections.DListImpl_2
>>>> #DArrayClass=org.apache.ojb.odmg.collections.DListImpl
>>>> #
>>>> # org.odmg.DMap implementation class
>>>> DMapClass=org.apache.ojb.odmg.collections.DMapImpl
>>>> #
>>>> # org.odmg.DBag implementation class
>>>> DBagClass=org.apache.ojb.odmg.collections.DBagImpl
>>>> #
>>>> # org.odmg.DSet implementation class
>>>> DSetClass=org.apache.ojb.odmg.collections.DSetImpl
>>>> #
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # Meta data / mapping settings
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # The PersistentFieldClass property defines the implementation class
>>>> # for PersistentField attributes used in the OJB MetaData layer.
>>>> # By default the best performing attribute/refection based 
>>>> implementation
>>>> # is selected (PersistentFieldDirectAccessImpl).
>>>> #
>>>> # - PersistentFieldDirectAccessImpl
>>>> #   is a high-speed version of the access strategies.
>>>> #   It does not cooperate with an AccessController,
>>>> #   but accesses the fields directly. Persistent
>>>> #   attributes don't need getters and setters
>>>> #   and don't have to be declared public or protected
>>>> # - PersistentFieldPrivilegedImpl
>>>> #   Same as above, but does cooperate with AccessController and do not
>>>> #   suppress the java language access check.
>>>> # - PersistentFieldIntrospectorImpl
>>>> #   uses JavaBeans compliant calls only to access persistent 
>>>> attributes.
>>>> #   No Reflection is needed. But for each attribute xxx there must be
>>>> #   public getXxx() and setXxx() methods.
>>>> # - PersistentFieldDynaBeanAccessImpl
>>>> #   implementation used to access a property from a
>>>> #   org.apache.commons.beanutils.DynaBean.
>>>> # - PersistentFieldAutoProxyImpl
>>>> #   for each field determines upon first access how to access this 
>>>> particular field
>>>> #   (directly, as a bean, as a dyna bean) and then uses that strategy
>>>> #
>>>> PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl 
>>>>
>>>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldPrivilegedImpl 
>>>>
>>>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldIntrospectorImpl 
>>>>
>>>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDynaBeanAccessImpl 
>>>>
>>>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldAutoProxyImpl 
>>>>
>>>> #
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # Component Intercepting for Profiling and Tracing
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # By enabling an InterceptorClass all OJB components will use
>>>> # this Interceptor. Interceptors allow advanced tracing and Profiling
>>>> # of all component method calls.
>>>> # This is currently an experimental feature useful only for OJB 
>>>> kernel developers.
>>>> #
>>>> #InterceptorClass=org.apache.ojb.broker.util.interceptor.TracingInterceptor 
>>>>
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # Transaction Management and assocation
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # Use the LocalTxManager if you want the transaction to be 
>>>> associated by a thread
>>>> #OJBTxManagerClass=org.apache.ojb.odmg.LocalTxManager
>>>> # Use the JTATxManager if you want the transaction to be associated 
>>>> via the Transaction
>>>> # manager that is in your application server.
>>>> #eusoda
>>>> OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
>>>> #
>>>> # The TransactionManager is acquired in different ways dependent on 
>>>> the application server.
>>>> # The JTATransactionManagerClass property allows you to specify the 
>>>> class that implements
>>>> # the proper behaviour for finding the transaction manager. Only 
>>>> use when OJBTxManagerClass
>>>> # is set to a factory that uses the application server transaction 
>>>> manager
>>>> # (org.apache.ojb.odmg.JTATxManager)
>>>> #
>>>> # JBoss Transaction Manager Factory
>>>> JTATransactionManagerClass=org.apache.ojb.odmg.transaction.JBossTransactionManagerFactory 
>>>>
>>>> # Weblogic Transaction Manager Factory
>>>> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.WeblogicTransactionManagerFactory 
>>>>
>>>> # WebSphere transaction manager factory
>>>> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.WebSphereTransactionManagerFactory 
>>>>
>>>> # Orion transaction manager factory
>>>> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.OrionTransactionManagerFactory 
>>>>
>>>> #
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>> # End of OJB.properties file
>>>> #---------------------------------------------------------------------------------------- 
>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------ 
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: auto-delete does not work anymore: rc6???

Posted by Armin Waibel <ar...@apache.org>.
Hi again,

the fix is in CVS. Now should the new auto-xxx really backward 
compatible and should be handled in a way described in
http://db.apache.org/ojb/tutorial3.html#1:1%20auto-xxx%20setting

regards,
Armin

Andreas Bohnert wrote:
> hi armin,
> 
> 
> that was a good suggestion! I don't change the meta data at runtime, but 
> it seems that my auto-delete='false' is replaced (because it's now 
> deprecated) with an auto-delete='object',
> but it should be replaced with 'none'! well, that what I would excpect ;)
> 
> thats what I got:
> 
> <reference-descriptor
>        name="contact"
>        class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>        auto-retrieve="true"
>        auto-update="object"
>        auto-delete="object"
>      >
>        <foreignkey field-ref="contactId"/>
>      </reference-descriptor>
> 
> and that is what it should be
> 
>  <reference-descriptor
>   name="contact"
>   auto-retrieve="true"
>   auto-update="true"
>   auto-delete="false"
>   class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>  >
>   <foreignkey field-ref="contactId"/>
> </reference-descriptor>
> 
> regards
> andreas
> 
> Armin Waibel wrote:
> 
>> Hi Andreas,
>>
>> your code seems ok. Do you manipulate metadata at runtime? Maybe the 
>> auto-delete flag change at runtime. Can you check this in your 
>> deleteValidate(...)-method
>>
>> Collection ords = 
>> broker.getClassDescriptor(Repository.class).getObjectReferenceDescriptors(); 
>>
>> for(Iterator iterator = ords.iterator(); iterator.hasNext();)
>> {
>>    String str = ((ObjectReferenceDescriptor) iterator.next()).toXML();
>>    System.out.println(str);
>> }
>>
>> and check if the auto-delete is really false (false == 17, true == 23)
>>
>> regards,
>> Armin
>>
>> Andreas Bohnert wrote:
>>
>>> hello armin,
>>>
>>> yes, I did replace the repository.dtd.
>>> I just simplified my application source. Here is the client/server 
>>> code that produce the wrong deletes.
>>> I'm using jboss 3.2.3 and postgresql 7.4.1.
>>> the repository files and the database structure is attached.
>>>
>>> it's strange, because I think, the ojb junit testcase should cover 
>>> this situation, and it's also strange, that no one else complained
>>> thanks,
>>> andreas
>>>
>>> ejb code:
>>> /**
>>>     * @ejb:interface-method
>>>     */
>>>    public void deleteValidate(Class dClass, Criteria crit) throws 
>>> Exception {
>>>        PersistenceBroker broker = getBroker();
>>>        Object o = null;
>>>        try {
>>>            Query query = QueryFactory.newQuery( dClass, crit, false 
>>> );                      o = broker.getObjectByQuery(query);
>>>            log.debug("object to delete: "+o);
>>>            broker.delete( o );
>>>        } catch (PersistenceBrokerException e) {
>>>            log.error("object could not be deleted: " + o);
>>>            throw new Exception(e);
>>>        }
>>>        broker.close();
>>>    }
>>>   client code:
>>>    public void deleteValidateClient() {
>>>        Criteria crit = new Criteria();
>>>        crit.addEqualTo("institution_contact_id", new Integer(1049080));
>>>        try {
>>>            OJBSessionRemote ojb = OjbUtil.getOJBSessionRemote();
>>>            ojb.deleteValidate( Institution_Contact.class, crit );
>>>        } catch (OJBLayerExc e) {
>>>            e.printStackTrace();
>>>        } catch (RemoteException e) {
>>>            e.printStackTrace();
>>>        } catch (Exception e) {
>>>            e.printStackTrace();
>>>        }
>>>    }
>>>
>>> this is the resulting spy.log:
>>> 1080640877421|15|0|statement|DELETE FROM institution_contact WHERE 
>>> institution_contact_id = ? |DELETE FROM institution_contact WHERE 
>>> institution_contact_id = '1049080'
>>> 1080640877421|0|0|statement|DELETE FROM contact WHERE contact_id = ? 
>>> |DELETE FROM contact WHERE contact_id = '1049040'
>>> 1080640877437|0|0|statement|DELETE FROM institution WHERE 
>>> institution_id = ? |DELETE FROM institution WHERE institution_id = 
>>> '1048857'
>>>
>>>
>>>
>>>
>>>  >Hi Andreas,
>>>
>>>  >I made a quick test. It works for me. Did you replace the 
>>> repository.dtd?
>>>  >Can you post the source code snip?
>>>
>>>  >regards,
>>>  >Armin
>>>
>>>
>>>
>>> Andreas Bohnert wrote:
>>>
>>>>
>>>>
>>>> hello everbody,
>>>>
>>>> today I checked out the rc6 cvs version and did some validation 
>>>> tests on my application.
>>>> I found out, that there is something going wrong, when I delete an 
>>>> object.
>>>>
>>>> I have an decomposed n-m relation:
>>>>
>>>> CONTACT --------INSTITUTION_CONTACT ------- INSTITUTION
>>>>
>>>> when I delete an INSTITUTION_CONTACT the related INSTITUTION and the 
>>>> CONTACT are deleted as well!!
>>>> I have put an auto-delete=false in my metadata, so I don't see a 
>>>> reason for that action.
>>>>
>>>> here is the metadata for INSTITUTION_CONTACT :
>>>> class-descriptor
>>>> class="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>>>> table="institution_contact"
>>>>
>>>>>
>>>> <field-descriptor id="0"
>>>>   name="institutionContactId"
>>>>   column="institution_contact_id"
>>>>   jdbc-type="INTEGER"
>>>>   primarykey="true"
>>>>   autoincrement="true"
>>>> />
>>>> <field-descriptor id="1"
>>>>   name="contactId"
>>>>   column="contact_id"
>>>>   jdbc-type="INTEGER"
>>>> />
>>>> <field-descriptor id="2"
>>>>   name="institutionId"
>>>>   column="institution_id"
>>>>   jdbc-type="INTEGER"
>>>> />
>>>> <field-descriptor id="3"
>>>>   name="isPublic"
>>>>   column="isPublic"
>>>>   jdbc-type="TINYINT"
>>>> />
>>>> <field-descriptor id="4"
>>>>   name="contactPrivileges"
>>>>   column="contactPrivileges"
>>>>   jdbc-type="INTEGER"
>>>> />
>>>> <field-descriptor id="5"
>>>>   name="sortHelp"
>>>>   column="sortHelp"
>>>>   jdbc-type="INTEGER"
>>>> />
>>>> <field-descriptor id="6"
>>>>   name="updateTime"
>>>>   column="updateTime"
>>>>   jdbc-type="TIMESTAMP"
>>>> />
>>>>
>>>>   <reference-descriptor
>>>>    name="contact"
>>>>    auto-retrieve="true"
>>>>    auto-update="true"
>>>>    auto-delete="false"
>>>>    class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>>>> >
>>>>    <foreignkey field-ref="contactId"/>
>>>> </reference-descriptor>
>>>>
>>>>   <reference-descriptor
>>>>    name="institution"
>>>>    auto-retrieve="true"
>>>>    auto-update="true"
>>>>    auto-delete="false"
>>>>    class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>>> >
>>>>    <foreignkey field-ref="institutionId"/>
>>>> </reference-descriptor>
>>>>
>>>>
>>>> </class-descriptor>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>>
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> <class-descriptor
>>>   class="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>>>   table="institution_contact"
>>>
>>>   <field-descriptor id="0"
>>>     name="institutionContactId"
>>>     column="institution_contact_id"
>>>     jdbc-type="INTEGER"
>>>     primarykey="true"
>>>     autoincrement="true"
>>>   />
>>>   <field-descriptor id="1"
>>>     name="contactId"
>>>     column="contact_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="2"
>>>     name="institutionId"
>>>     column="institution_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="3"
>>>     name="isPublic"
>>>     column="isPublic"
>>>     jdbc-type="TINYINT"
>>>   />
>>>   <field-descriptor id="4"
>>>     name="contactPrivileges"
>>>     column="contactPrivileges"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="5"
>>>     name="sortHelp"
>>>     column="sortHelp"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="6"
>>>     name="updateTime"
>>>     column="updateTime"
>>>     jdbc-type="TIMESTAMP"
>>>   />
>>>
>>>     <reference-descriptor
>>>      name="contact"
>>>      auto-retrieve="true"
>>>      auto-update="true"
>>>      auto-delete="false"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>>>   >
>>>      <foreignkey field-ref="contactId"/>
>>>   </reference-descriptor>
>>>
>>>     <reference-descriptor
>>>      name="institution"
>>>      auto-retrieve="true"
>>>      auto-update="true"
>>>      auto-delete="false"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>>   >
>>>      <foreignkey field-ref="institutionId"/>
>>>   </reference-descriptor>
>>>
>>>
>>> </class-descriptor>
>>>
>>>
>>> <class-descriptor
>>>   class="at.weberhofer.eusoda.shared.orm.Contact"
>>>   table="contact"
>>>
>>>   <field-descriptor id="1"
>>>     name="contactId"
>>>     column="contact_id"
>>>     jdbc-type="INTEGER"
>>>     primarykey="true"
>>>     autoincrement="true"
>>>   />
>>>   <field-descriptor id="2"
>>>     name="genderAppResKeyId"
>>>     column="genderAppResKey_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="3"
>>>     name="descUserResKeyId"
>>>     column="descUserResKey_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="4"
>>>     name="updateContactId"
>>>     column="updateContact_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="5"
>>>     name="salutation"
>>>     column="salutation"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="6"
>>>     name="academicTitle"
>>>     column="academicTitle"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="7"
>>>     name="functionalTitle"
>>>     column="functionalTitle"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="8"
>>>     name="firstName"
>>>     column="firstName"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="9"
>>>     name="lastName"
>>>     column="lastName"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="10"
>>>     name="profession"
>>>     column="profession"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="11"
>>>     name="login"
>>>     column="login"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="12"
>>>     name="pwd"
>>>     column="pwd"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="13"
>>>     name="isRemoved"
>>>     column="isRemoved"
>>>     jdbc-type="TINYINT"
>>>   />
>>>   <field-descriptor id="14"
>>>     name="isPopup"
>>>     column="isPopup"
>>>     jdbc-type="TINYINT"
>>>   />
>>>   <field-descriptor id="15"
>>>     name="updateTime"
>>>     column="updateTime"
>>>     jdbc-type="TIMESTAMP"
>>>   />
>>>
>>>   <reference-descriptor
>>>      name="descUserResKey"
>>>      auto-retrieve="false"
>>>      auto-update="true"
>>>      auto-delete="true"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>>>   >
>>>      <foreignkey field-ref="descUserResKeyId"/>
>>>   </reference-descriptor>
>>>
>>>   <reference-descriptor
>>>      name="genderAppResKey"
>>>      auto-retrieve="false"
>>>      auto-update="false"
>>>      auto-delete="false"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.AppResKey"
>>>   >
>>>      <foreignkey field-ref="genderAppResKeyId"/>
>>>   </reference-descriptor>
>>>
>>>   <collection-descriptor
>>>          name="institutionContacts"
>>>          
>>> element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>>>          auto-retrieve="false"
>>>          auto-update="false"
>>>          auto-delete="false"
>>>       >
>>>       <inverse-foreignkey field-ref="contactId"/>
>>>   </collection-descriptor>
>>>
>>>   <collection-descriptor
>>>          name="contactAppResKey"
>>>          
>>> element-class-ref="at.weberhofer.eusoda.shared.orm.Contact_AppResKey"
>>>          auto-retrieve="true"
>>>          auto-update="true"
>>>          auto-delete="false"
>>>       >
>>>       <inverse-foreignkey field-ref="contactId"/>
>>>   </collection-descriptor>
>>>
>>>   <collection-descriptor
>>>      name="contactRegions"
>>>      element-class-ref="at.weberhofer.eusoda.shared.orm.Contact_Region"
>>>      auto-retrieve="false"
>>>      auto-update="false"
>>>      auto-delete="false"
>>>      >
>>>      <inverse-foreignkey field-ref="contactId"/>
>>>   </collection-descriptor>
>>>
>>> </class-descriptor>
>>>
>>> <class-descriptor
>>>   class="at.weberhofer.eusoda.shared.orm.Institution"
>>>   table="institution"
>>>
>>>   <field-descriptor id="1"
>>>     name="institutionId"
>>>     column="institution_id"
>>>     jdbc-type="INTEGER"
>>>     primarykey="true"
>>>     autoincrement="true"
>>>   />
>>>   <field-descriptor id="2"
>>>     name="topInstitutionId"
>>>     column="topInstitution_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="3"
>>>     name="umbrellaInstitutionId"
>>>     column="umbrellaInstitution_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="4"
>>>     name="createContactId"
>>>     column="createContact_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="5"
>>>     name="updateContactId"
>>>     column="updateContact_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="6"
>>>     name="instDescUserResKeyId"
>>>     column="instDescUserResKey_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="7"
>>>     name="businessHoursUserResKeyId"
>>>     column="businessHoursUserResKey_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="8"
>>>     name="instTypeAppResKeyId"
>>>     column="instTypeAppResKey_id"
>>>     jdbc-type="INTEGER"
>>>   />
>>>   <field-descriptor id="9"
>>>     name="institution1"
>>>     column="institution1"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="10"
>>>     name="institution2"
>>>     column="institution2"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="11"
>>>     name="isPublic"
>>>     column="isPublic"
>>>     jdbc-type="TINYINT"
>>>   />
>>>   <field-descriptor id="12"
>>>     name="infoInternal"
>>>     column="infoInternal"
>>>     jdbc-type="VARCHAR"
>>>   />
>>>   <field-descriptor id="13"
>>>     name="foundationDate"
>>>     column="foundationDate"
>>>     jdbc-type="TIMESTAMP"
>>>   />
>>>   <field-descriptor id="14"
>>>     name="sortHelp"
>>>     column="sortHelp"
>>>     jdbc-type="SMALLINT"
>>>   />
>>>   <field-descriptor id="15"
>>>     name="isUmbrella"
>>>     column="isUmbrella"
>>>     jdbc-type="TINYINT"
>>>   />
>>>   <field-descriptor id="16"
>>>     name="isRemoved"
>>>     column="isRemoved"
>>>     jdbc-type="TINYINT"
>>>   />
>>>   <field-descriptor id="17"
>>>     name="createTime"
>>>     column="createTime"
>>>     jdbc-type="TIMESTAMP"
>>>   />
>>>   <field-descriptor id="18"
>>>     name="updateTime"
>>>     column="updateTime"
>>>     jdbc-type="TIMESTAMP"
>>>   />
>>>
>>>   <reference-descriptor
>>>      name="instDescUserResKey"
>>>      auto-retrieve="false"
>>>      auto-update="true"
>>>      auto-delete="true"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>>>      >
>>>      <foreignkey field-ref="instDescUserResKeyId"/>
>>>   </reference-descriptor>
>>>
>>>   <reference-descriptor
>>>      name="businessHoursUserResKey"
>>>      auto-retrieve="false"
>>>      auto-update="true"
>>>      auto-delete="true"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>>>      >
>>>      <foreignkey field-ref="businessHoursUserResKeyId"/>
>>>   </reference-descriptor>
>>>
>>>   <reference-descriptor
>>>      name="instTypeAppResKey"
>>>      auto-retrieve="false"
>>>      auto-update="false"
>>>      auto-delete="false"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.AppResKey"
>>>      >
>>>      <foreignkey field-ref="instTypeAppResKeyId"/>
>>>   </reference-descriptor>
>>>
>>>   <reference-descriptor
>>>      name="topInstitution"
>>>      auto-retrieve="true"
>>>      auto-update="true"
>>>      auto-delete="false"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>>      >
>>>      <foreignkey field-ref="topInstitutionId"/>
>>>   </reference-descriptor>
>>>
>>>   <reference-descriptor
>>>      name="umbrellaInstitution"
>>>      auto-retrieve="true"
>>>      auto-update="true"
>>>      auto-delete="false"
>>>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>>      >
>>>      <foreignkey field-ref="umbrellaInstitutionId"/>
>>>   </reference-descriptor>
>>>
>>>   <collection-descriptor
>>>      name="institutionRegions"
>>>      
>>> element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Region"
>>>      auto-retrieve="false"
>>>      auto-update="true"
>>>      auto-delete="false"
>>>      >
>>>      <inverse-foreignkey field-ref="institutionId"/>
>>>   </collection-descriptor>
>>>
>>>   <collection-descriptor
>>>          name="institutionContacts"
>>>          
>>> element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>>>          auto-retrieve="false"
>>>          auto-update="false"
>>>          auto-delete="false"
>>>       >
>>>       <inverse-foreignkey field-ref="institutionId"/>
>>>   </collection-descriptor>
>>>
>>> </class-descriptor>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> CREATE TABLE institution (
>>>     institution_id integer DEFAULT 0 NOT NULL,
>>>     topinstitution_id integer DEFAULT 0 NOT NULL,
>>>     umbrellainstitution_id integer DEFAULT 0 NOT NULL,
>>>     createcontact_id integer DEFAULT 0 NOT NULL,
>>>     updatecontact_id integer DEFAULT 0 NOT NULL,
>>>     instdescuserreskey_id integer DEFAULT 0 NOT NULL,
>>>     businesshoursuserreskey_id integer DEFAULT 0 NOT NULL,
>>>     insttypeappreskey_id integer DEFAULT 0 NOT NULL,
>>>     institution1 character varying(120) DEFAULT ''::character varying 
>>> NOT NULL,
>>>     institution2 character varying(120) DEFAULT ''::character varying 
>>> NOT NULL,
>>>     ispublic smallint DEFAULT (1)::smallint NOT NULL,
>>>     infointernal character varying(255) DEFAULT ''::character varying 
>>> NOT NULL,
>>>     foundationdate timestamp without time zone DEFAULT '0001-01-01 
>>> 00:00:00'::timestamp without time zone,
>>>     sorthelp smallint DEFAULT (0)::smallint NOT NULL,
>>>     isumbrella smallint DEFAULT (0)::smallint NOT NULL,
>>>     isremoved smallint DEFAULT (0)::smallint NOT NULL,
>>>     createtime timestamp without time zone DEFAULT '0001-01-01 
>>> 00:00:00'::timestamp without time zone NOT NULL,
>>>     updatetime timestamp without time zone DEFAULT '0001-01-01 
>>> 00:00:00'::timestamp without time zone NOT NULL
>>> );
>>>
>>> ALTER TABLE ONLY institution
>>>     ADD CONSTRAINT institution_pkey PRIMARY KEY (institution_id);
>>>
>>>
>>>
>>>
>>> CREATE TABLE contact (
>>>     contact_id integer DEFAULT 0 NOT NULL,
>>>     descuserreskey_id integer DEFAULT 0 NOT NULL,
>>>     updatecontact_id integer DEFAULT 0 NOT NULL,
>>>     genderappreskey_id integer DEFAULT 0 NOT NULL,
>>>     salutation character varying(80) DEFAULT ''::character varying 
>>> NOT NULL,
>>>     academictitle character varying(80) DEFAULT ''::character varying 
>>> NOT NULL,
>>>     functionaltitle character varying(80) DEFAULT ''::character 
>>> varying NOT NULL,
>>>     firstname character varying(80) DEFAULT ''::character varying NOT 
>>> NULL,
>>>     lastname character varying(80) DEFAULT ''::character varying NOT 
>>> NULL,
>>>     profession character varying(255) DEFAULT ''::character varying 
>>> NOT NULL,
>>>     login character varying(10) DEFAULT ''::character varying NOT NULL,
>>>     pwd character varying(80) DEFAULT ''::character varying NOT NULL,
>>>     isremoved smallint DEFAULT (0)::smallint NOT NULL,
>>>     updatetime timestamp without time zone DEFAULT '0001-01-01 
>>> 00:00:00'::timestamp without time zone NOT NULL,
>>>     ispopup smallint DEFAULT 0
>>> );
>>>
>>> ALTER TABLE ONLY contact
>>>     ADD CONSTRAINT contact_pkey PRIMARY KEY (contact_id);
>>>
>>>
>>>
>>> CREATE TABLE institution_contact (
>>>     institution_contact_id integer DEFAULT 0 NOT NULL,
>>>     contact_id integer DEFAULT 0 NOT NULL,
>>>     institution_id integer DEFAULT 0 NOT NULL,
>>>     contactprivileges integer DEFAULT 0 NOT NULL,
>>>     ispublic smallint,
>>>     sorthelp integer DEFAULT 0 NOT NULL,
>>>     updatetime timestamp without time zone DEFAULT '0001-01-01 
>>> 00:00:00'::timestamp without time zone NOT NULL
>>> );
>>>
>>> ALTER TABLE ONLY institution_contact
>>>     ADD CONSTRAINT institution_contact_pkey PRIMARY KEY 
>>> (institution_contact_id);
>>>
>>>
>>> INSERT INTO institution VALUES (1048857, 1048817, 0, 0, 1, 1050040, 
>>> 1050041, 40, 'Ebay', '', 1, 'internal', NULL, 0, 1, 0, '2004-03-22 
>>> 16:03:25.609', '2004-03-30 11:48:29.046');
>>> INSERT INTO contact VALUES (1049040, 0, 1, 35, '', '', '', '', 
>>> 'deleteUser', '', 'du', '13A014CB9DE9F7CAD88D5DAFB70ECB41', 0, 
>>> '2004-03-30 11:48:08.265', 0);
>>> INSERT INTO institution_contact VALUES (1049080, 1049040, 1048857, 1, 
>>> 0, 0, '2004-03-30 11:48:29.046');
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> # OJB.properties -- configuration of the OJB runtime environment
>>> # Version: 1.0
>>> # (c) 2001, 2002, 2003 Apache Software Foundation
>>> # Author: Thomas Mahler and many others
>>> # @version $Id: OJB.properties,v 1.63 2004/03/24 13:58:01 tomdz Exp $
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # repository file settings
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The repositoryFile entry tells OJB to use this file as as its 
>>> standard mapping
>>> # repository. The file is looked up from the classpath.
>>> #
>>> repositoryFile=repository.xml
>>> #
>>> # If the useSerializedRepository entry is set to true, OJB tries to 
>>> load a
>>> # serialized version of the repository for performance reasons.
>>> # if set to false, OJB always loads the xml file.
>>> # Setting this flag to true will accelerate the startup sequence of OJB.
>>> # If set to true changes to the repository.xml file will only be 
>>> detected
>>> # after maually deleting the repository.xml.serialized file.
>>> useSerializedRepository=false
>>> #
>>> # If Repository serialization is used the entry 
>>> serializedRepositoryPath defines the
>>> # directory where the Repository is written to and read from.
>>> # this entry is used only when the useSerializedRepository flag is 
>>> set to true
>>> #
>>> serializedRepositoryPath=.
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # PersistenceBrokerFactory / PersistenceBroker
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The PersistenceBrokerFactoryClass entry decides which concrete
>>> # PersistenceBrokerFactory implemention is to be used.
>>> PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl 
>>>
>>> # If in managed environment *only* the PB-api was used it's 
>>> recommended to use this factory
>>> # to enable the PersistenceBroker instances to participate in the JTA 
>>> transaction. This makes
>>> # e.g. PBStateListener work properly in managed environments.
>>> # eusoda
>>> #PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl 
>>>
>>> #
>>> #
>>> # The PersistenceBrokerClass entry decides which concrete 
>>> PersistenceBroker
>>> # implementation is to be served by the PersistenceBrokerFactory.
>>> # This is the singlevm implementation:
>>> PersistenceBrokerClass=org.apache.ojb.broker.core.PersistenceBrokerImpl
>>> #
>>> # This is an implementation that uses Prevayler (prevayler.sf.net) as 
>>> the persistent storage.
>>> # Using this implementation OJB works as a simple OODBMS
>>> #PersistenceBrokerClass=org.apache.ojb.broker.prevayler.PBPrevaylerImpl
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # PersistenceBroker pool
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # PersistenceBroker pool configuration
>>> # This pool uses the jakarta-commons-pool api.
>>> # There you can find things described in detail.
>>> #
>>> # maximum number of brokers that can be borrowed from the
>>> # pool at one time. When non-positive, there is no limit.
>>> maxActive=100
>>> #
>>> # controls the maximum number of brokers that can sit idle in the
>>> # pool (per key) at any time. When non-positive, there is no limit
>>> maxIdle=-1
>>> #
>>> # max time block to get broker instance from pool, after that 
>>> exception is thrown.
>>> # When non-positive, block till last judgement
>>> maxWait=2000
>>> #
>>> # indicates how long the eviction thread should sleep before "runs" 
>>> of examining
>>> # idle objects. When non-positive, no eviction thread will be launched.
>>> timeBetweenEvictionRunsMillis=-1
>>> #
>>> # specifies the minimum amount of time that an broker may sit idle
>>> # in the pool before it is eligable for eviction due to idle time.
>>> # When non-positive, no object will be dropped from the pool due
>>> # to idle time alone (depends on timeBetweenEvictionRunsMillis > 0)
>>> minEvictableIdleTimeMillis=1000000
>>> #
>>> # specifies the behaviour of the pool when broker capacity is
>>> # exhausted (see maxActive above)
>>> # 0 - fail
>>> # 1 - block
>>> # 2 - grow
>>> whenExhaustedAction=0
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # ConnectionFactory / Default ConnectionPool
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The ConnectionFactoryClass entry determines which kind of 
>>> ConnectionFactory
>>> # is to be used within org.apache.ojb as connection factory.
>>> # A ConnectionFactory is responsible for creating
>>> # JDBC Connections. Current version ships four implementations:
>>> #
>>> # 1. ConnectionFactoryNotPooledImpl
>>> #    No pooling, no playing around.
>>> #    Every connection request returns a new connection,
>>> #    every connection release close the connection.
>>> # 2. ConnectionFactoryPooledImpl
>>> #    This implementation supports connection pooling.
>>> # 3. ConnectionFactoryDBCPImpl
>>> #    Using the jakarta-DBCP api for connection management, support
>>> #    connection- and prepared statement-pooling, abandoned connection 
>>> handling.
>>> # 4. ConnectionFactoryManagedImpl
>>> #    Connection factory for use within managed environments - e.g. 
>>> JBoss.
>>> #    Every obtained DataSource was wrapped within OJB (and ignore
>>> #    e.g. con.commit() calls within OJB).
>>> #    Use this implementation e.g if you use Datasources from an 
>>> application server.
>>> #
>>> # Use the OJB performance tests to decide, which implementation is 
>>> best for you.
>>> # The proper way of obtaining a connection is configured in
>>> # JDBCConnectionDescriptor entries in the repository.xml file.
>>> # If want a more fine grained control of each connection pool used by 
>>> OJB,
>>> # take a look at the repository.dtd, there was a possibility to override
>>> # this default connection factory entry in each 
>>> JDBCConnectionDescriptor.
>>> #
>>> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl 
>>>
>>> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl 
>>>
>>> #eusoda
>>> ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl 
>>>
>>> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl 
>>>
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # ConnectionManager
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The ConnectionManagerClass entry defines the ConnectionManager 
>>> implemementation to be used
>>> ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl 
>>>
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # SqlGenerator
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The SqlGeneratorClass entry defines the SqlGenerator 
>>> implemementation to be used
>>> SqlGeneratorClass=org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl 
>>>
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # CollectionProxy class
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The optional CollectionProxy entry defines the class to be used for 
>>> CollectionProxies
>>> # if this entry is null org.apache.ojb.broker.accesslayer.ListProxy 
>>> is used for Lists
>>> # and org.apache.ojb.broker.accesslayer.CollectionProxy for Collections
>>> #
>>> #CollectionProxyClass=
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # StatementManager
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The StatementManagerClass entry defines the StatementManager 
>>> implemementation to be used
>>> StatementManagerClass=org.apache.ojb.broker.accesslayer.StatementManager
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # StatementsForClass
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The StatementsForClassClass entry defines the StatementsForClass 
>>> implemementation to be used
>>> # to implement cached statements.
>>> StatementsForClassClass=org.apache.ojb.broker.accesslayer.StatementsForClassImpl 
>>>
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # JdbcAccess
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The JdbcAccessClass entry defines the JdbcAccess implemementation 
>>> to be used
>>> JdbcAccessClass=org.apache.ojb.broker.accesslayer.JdbcAccessImpl
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Object cache
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The ObjectCacheClass entry tells OJB which concrete ObjectCache
>>> # implementation is to be used as standard cache.
>>> # Its also possible to override this entry adding object-cache elements
>>> # on jdbc-connection-descriptor level and
>>> # per class-descriptor in repository file. More info see documentation.
>>> #
>>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl
>>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheEmptyImpl
>>> #eusoda
>>> ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
>>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheJCSPerClassImpl
>>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerClassImpl
>>> #
>>> #
>>> # This property is only relevant if the per class-descriptor 
>>> object-cache
>>> # declaration was used in conjunction with metadata runtime changes.
>>> # If set 'flase' the class name of the object is used
>>> # to find a per class ObjectCache implementation.
>>> # If set 'true' the ObjectCacheDescriptor instance is used as key to
>>> # find a per class ObjectCache, this enables to use different 
>>> ObjectCache
>>> # instances for the same class.
>>> descriptorBasedCaches=false
>>> #
>>> #
>>> # Use CacheFilters to do filter operations before caching methods were
>>> # called. Build your own filter class by implementing 
>>> org.apache.ojb.cache.CacheFilter.
>>> # It is possible to use a arbitrary number of CacheFilters, but this 
>>> slows
>>> # down the performance of the cache, thus handle with care.
>>> #
>>> # - org.apache.ojb.broker.cache.CacheFilterClassImpl
>>> # allows filtering of classes
>>> # - org.apache.ojb.broker.cache.CacheFilterPackageImpl
>>> # allows filtering of packages
>>> # More info see Javadoc of the according classes.
>>> # Set a comma separated list of CacheFilter.
>>> #ObjectCacheFilter=org.apache.ojb.broker.cache.CacheFilterClassImpl,org.apache.ojb.broker.cache.CacheFilterPackageImpl 
>>>
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Locking
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The LockManagerClass entry tells OJB which concrete LockManager
>>> # implementation is to be used.
>>> LockManagerClass=org.apache.ojb.odmg.locking.LockManagerDefaultImpl
>>> #
>>> # The LockMapClass entry tells OJB which concrete LockMap
>>> # implementation is to be used.
>>> # If OJB is running on multiple concurrent clients it is recommended
>>> # to use the RemoteLockMapImpl. It guarantees to provide
>>> # Lockmanagement across multiple JVMs.
>>> # This Implemenation relies on a Servlet based Lockserver. To use it 
>>> you have to
>>> # deploy the ojb-lockserver.war into a Servlet engine.
>>> # and you have to set the Property LockServletUrl to point to this 
>>> servlet.
>>> # (see LockServletUrl section below).
>>> # If OJB is running in a single JVM (e.g. in a desktop app, or in a 
>>> servlet
>>> # engine) it is save to use the InMemoryLockMapImpl. Using it will 
>>> result
>>> # in a large performance gain.
>>> #LockMapClass=org.apache.ojb.odmg.locking.RemoteLockMapImpl
>>> LockMapClass=org.apache.ojb.odmg.locking.InMemoryLockMapImpl
>>> #
>>> # The LockTimeout entry defines the maximum time in milliseconds
>>> # that a lock may be hold. Defaults to 60000 = 1 minute
>>> LockTimeout=60000
>>> #
>>> # The ImplicitLocking entry defines if implicit lock acquisition is
>>> # to be used. If set to true OJB implicitely locks objects to ODMG
>>> # transactions after performing OQL queries.
>>> # If implicit locking is used locking objects is recursive, that is
>>> # associated objects are also locked.
>>> # If ImplicitLocking is set to false, no locks are obtained in OQL
>>> # queries and there is also no recursive locking.
>>> ImplicitLocking=true
>>> #ImplicitLocking=false
>>> #
>>> #
>>> # The LockServletUrl entry points to the Lockserver servlet.
>>> # This Servlet is addressed by all distributed JVMs if the 
>>> RemoteLockMapImpl
>>> # is used.
>>> LockServletUrl=http://127.0.0.1:8080/ojb-lockserver
>>> #
>>> #
>>> # The LockAssociations entry defines the behaviour for the OJB
>>> # implicit locking feature. If set to WRITE (default) acquiring a write-
>>> # lock on a given object x implies write locks on all objects associated
>>> # to x. If set to READ implicit read-locks are acquired.
>>> # Acquiring a read-lock on x thus allways results in implicit read-locks
>>> # on all associated objects.
>>> #LockAssociations=READ
>>> LockAssociations=WRITE
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Logging
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The LoggerClass entry tells OJB which concrete Logger
>>> # implementation is to be used.
>>> #
>>> # Commons-logging
>>> #LoggerClass=org.apache.ojb.broker.util.logging.CommonsLoggerImpl
>>> # log4j based logging
>>> #eusoda
>>> LoggerClass=org.apache.ojb.broker.util.logging.Log4jLoggerImpl
>>> # OJB's own simple looging support
>>> #LoggerClass=org.apache.ojb.broker.util.logging.PoorMansLoggerImpl
>>> LoggerConfigFile=log4j.properties
>>> #
>>> # The LogLevel entries tells OJB which LogLevels are active
>>> # for the different loggers used within OJB
>>> # Loglevels: DEBUG < INFO < WARN < ERROR < FATAL
>>> # That is loglevel WARN won't log DEBUG and INFO messages,
>>> # but will log WARN, ERROR, and FATAL messages
>>> #
>>> # Global default log level used for all logging
>>> # entities if not specified
>>> ROOT.LogLevel=ERROR
>>> #
>>> # The Default Logger instance used within OJB
>>> DEFAULT.LogLevel=WARN
>>> # Logger for PersistenceBrokerImpl class
>>> org.apache.ojb.broker.core.PersistenceBrokerImpl.LogLevel=WARN
>>> # Logger for PersistenceBrokerFactory class 
>>> PersistenceBrokerFactoryDefaultImpl
>>> org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.LogLevel=WARN 
>>>
>>> # Logger for RepositoryXmlHandler, useful for debugging parsing of 
>>> repository.xml!
>>> # persistence capable object metadata
>>> org.apache.ojb.broker.metadata.RepositoryXmlHandler.LogLevel=WARN
>>> # Logger for ConnectionDescriptorXmlHandler, useful for debugging 
>>> parsing of repository.xml!
>>> # connection specific metadata
>>> org.apache.ojb.broker.metadata.ConnectionDescriptorXmlHandler.LogLevel=WARN 
>>>
>>> # Logger for JdbcAccess, useful for debugging JDBC related problems
>>> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.LogLevel=WARN
>>> # Logger for RsIterator, useful for debugging problems with Object 
>>> materialization
>>> org.apache.ojb.broker.accesslayer.RsIterator.LogLevel=WARN
>>> # Logger for StatementsForClass, useful for debugging JDBC Connection 
>>> related problems
>>> org.apache.ojb.broker.accesslayer.StatementsForClassImpl.LogLevel=WARN
>>> # Logger for SqlGenerator, useful for debugging generation of SQL
>>> org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.LogLevel=WARN 
>>>
>>> # Logger for RepositoryPersistor
>>> org.apache.ojb.broker.metadata.RepositoryPersistor.LogLevel=WARN
>>> # Logger for ConnectionFactory base class
>>> org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.LogLevel=WARN 
>>>
>>> # Logger for ConnectionManager
>>> org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.LogLevel=WARN
>>> #
>>> # Special Logger categories used in test suite and tutorials
>>> #
>>> # Logger for the ODMG Implementation
>>> ODMG.LogLevel=DEBUG
>>> # Logger for the JDO RI Implementation
>>> JDO.LogLevel=DEBUG
>>> # Logger for the performance tests
>>> performance.LogLevel=INFO
>>> # Logger for the soda api
>>> soda.LogLevel=WARN
>>> # Logger for the factory service
>>> ConfigurableFactory.LogLevel=WARN
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # OQL / SQL settings
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The OqlCollectionClass entry defines the collection type returned
>>> # from OQL queries. By default this value is set to DListImpl.
>>> # This will be good for most situations as DList allows maximum 
>>> flexibility
>>> # in a ODMG environment. See also section 'ODMG settings'.
>>> # Using DLists for large resultsets may be bad for application 
>>> performance.
>>> # For these scenarios you can use ArrayLists or Vectors.
>>> # Important note: the collections class to be used MUST implement the
>>> # interface org.apache.ojb.broker.ManageableCollection.
>>> #
>>> OqlCollectionClass=org.apache.ojb.odmg.collections.DListImpl_2
>>> # 
>>> OqlCollectionClass=org.apache.ojb.broker.util.collections.ManageableArrayList 
>>>
>>> # OqlCollectionClass=org.apache.ojb.broker.util.ManageableVector
>>> #
>>> # The SqlInLimit entry limits the number of values in IN-sql statement,
>>> # -1 for no limits. This hint is used in Criteria.
>>> SqlInLimit=200
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # ODMG settings
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Used ODMG collection implementation classes
>>> # (e.g. when do a Implementation#newDlist() call)
>>> #
>>> # org.odmg.DList implementation class
>>> DListClass=org.apache.ojb.odmg.collections.DListImpl_2
>>> #DListClass=org.apache.ojb.odmg.collections.DListImpl
>>> #
>>> # org.odmg.DArray implementation class
>>> DArrayClass=org.apache.ojb.odmg.collections.DListImpl_2
>>> #DArrayClass=org.apache.ojb.odmg.collections.DListImpl
>>> #
>>> # org.odmg.DMap implementation class
>>> DMapClass=org.apache.ojb.odmg.collections.DMapImpl
>>> #
>>> # org.odmg.DBag implementation class
>>> DBagClass=org.apache.ojb.odmg.collections.DBagImpl
>>> #
>>> # org.odmg.DSet implementation class
>>> DSetClass=org.apache.ojb.odmg.collections.DSetImpl
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Meta data / mapping settings
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # The PersistentFieldClass property defines the implementation class
>>> # for PersistentField attributes used in the OJB MetaData layer.
>>> # By default the best performing attribute/refection based 
>>> implementation
>>> # is selected (PersistentFieldDirectAccessImpl).
>>> #
>>> # - PersistentFieldDirectAccessImpl
>>> #   is a high-speed version of the access strategies.
>>> #   It does not cooperate with an AccessController,
>>> #   but accesses the fields directly. Persistent
>>> #   attributes don't need getters and setters
>>> #   and don't have to be declared public or protected
>>> # - PersistentFieldPrivilegedImpl
>>> #   Same as above, but does cooperate with AccessController and do not
>>> #   suppress the java language access check.
>>> # - PersistentFieldIntrospectorImpl
>>> #   uses JavaBeans compliant calls only to access persistent attributes.
>>> #   No Reflection is needed. But for each attribute xxx there must be
>>> #   public getXxx() and setXxx() methods.
>>> # - PersistentFieldDynaBeanAccessImpl
>>> #   implementation used to access a property from a
>>> #   org.apache.commons.beanutils.DynaBean.
>>> # - PersistentFieldAutoProxyImpl
>>> #   for each field determines upon first access how to access this 
>>> particular field
>>> #   (directly, as a bean, as a dyna bean) and then uses that strategy
>>> #
>>> PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl 
>>>
>>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldPrivilegedImpl 
>>>
>>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldIntrospectorImpl 
>>>
>>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDynaBeanAccessImpl 
>>>
>>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldAutoProxyImpl 
>>>
>>> #
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Component Intercepting for Profiling and Tracing
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # By enabling an InterceptorClass all OJB components will use
>>> # this Interceptor. Interceptors allow advanced tracing and Profiling
>>> # of all component method calls.
>>> # This is currently an experimental feature useful only for OJB 
>>> kernel developers.
>>> #
>>> #InterceptorClass=org.apache.ojb.broker.util.interceptor.TracingInterceptor 
>>>
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Transaction Management and assocation
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # Use the LocalTxManager if you want the transaction to be associated 
>>> by a thread
>>> #OJBTxManagerClass=org.apache.ojb.odmg.LocalTxManager
>>> # Use the JTATxManager if you want the transaction to be associated 
>>> via the Transaction
>>> # manager that is in your application server.
>>> #eusoda
>>> OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
>>> #
>>> # The TransactionManager is acquired in different ways dependent on 
>>> the application server.
>>> # The JTATransactionManagerClass property allows you to specify the 
>>> class that implements
>>> # the proper behaviour for finding the transaction manager. Only use 
>>> when OJBTxManagerClass
>>> # is set to a factory that uses the application server transaction 
>>> manager
>>> # (org.apache.ojb.odmg.JTATxManager)
>>> #
>>> # JBoss Transaction Manager Factory
>>> JTATransactionManagerClass=org.apache.ojb.odmg.transaction.JBossTransactionManagerFactory 
>>>
>>> # Weblogic Transaction Manager Factory
>>> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.WeblogicTransactionManagerFactory 
>>>
>>> # WebSphere transaction manager factory
>>> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.WebSphereTransactionManagerFactory 
>>>
>>> # Orion transaction manager factory
>>> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.OrionTransactionManagerFactory 
>>>
>>> #
>>> #---------------------------------------------------------------------------------------- 
>>>
>>> # End of OJB.properties file
>>> #---------------------------------------------------------------------------------------- 
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: auto-delete does not work anymore: rc6???

Posted by Andreas Bohnert <ab...@online.de>.
hi armin,


that was a good suggestion! I don't change the meta data at runtime, but 
it seems that my auto-delete='false' is replaced (because it's now 
deprecated) with an auto-delete='object',
but it should be replaced with 'none'! well, that what I would excpect ;)

thats what I got:

<reference-descriptor
        name="contact"
        class-ref="at.weberhofer.eusoda.shared.orm.Contact"
        auto-retrieve="true"
        auto-update="object"
        auto-delete="object"
      >
        <foreignkey field-ref="contactId"/>
      </reference-descriptor>

and that is what it should be

  <reference-descriptor
   name="contact"
   auto-retrieve="true"
   auto-update="true"
   auto-delete="false"
   class-ref="at.weberhofer.eusoda.shared.orm.Contact"
 >
   <foreignkey field-ref="contactId"/>
</reference-descriptor>

regards
andreas

Armin Waibel wrote:

> Hi Andreas,
>
> your code seems ok. Do you manipulate metadata at runtime? Maybe the 
> auto-delete flag change at runtime. Can you check this in your 
> deleteValidate(...)-method
>
> Collection ords = 
> broker.getClassDescriptor(Repository.class).getObjectReferenceDescriptors(); 
>
> for(Iterator iterator = ords.iterator(); iterator.hasNext();)
> {
>    String str = ((ObjectReferenceDescriptor) iterator.next()).toXML();
>    System.out.println(str);
> }
>
> and check if the auto-delete is really false (false == 17, true == 23)
>
> regards,
> Armin
>
> Andreas Bohnert wrote:
>
>> hello armin,
>>
>> yes, I did replace the repository.dtd.
>> I just simplified my application source. Here is the client/server 
>> code that produce the wrong deletes.
>> I'm using jboss 3.2.3 and postgresql 7.4.1.
>> the repository files and the database structure is attached.
>>
>> it's strange, because I think, the ojb junit testcase should cover 
>> this situation, and it's also strange, that no one else complained
>> thanks,
>> andreas
>>
>> ejb code:
>> /**
>>     * @ejb:interface-method
>>     */
>>    public void deleteValidate(Class dClass, Criteria crit) throws 
>> Exception {
>>        PersistenceBroker broker = getBroker();
>>        Object o = null;
>>        try {
>>            Query query = QueryFactory.newQuery( dClass, crit, false 
>> );                      o = broker.getObjectByQuery(query);
>>            log.debug("object to delete: "+o);
>>            broker.delete( o );
>>        } catch (PersistenceBrokerException e) {
>>            log.error("object could not be deleted: " + o);
>>            throw new Exception(e);
>>        }
>>        broker.close();
>>    }
>>   client code:
>>    public void deleteValidateClient() {
>>        Criteria crit = new Criteria();
>>        crit.addEqualTo("institution_contact_id", new Integer(1049080));
>>        try {
>>            OJBSessionRemote ojb = OjbUtil.getOJBSessionRemote();
>>            ojb.deleteValidate( Institution_Contact.class, crit );
>>        } catch (OJBLayerExc e) {
>>            e.printStackTrace();
>>        } catch (RemoteException e) {
>>            e.printStackTrace();
>>        } catch (Exception e) {
>>            e.printStackTrace();
>>        }
>>    }
>>
>> this is the resulting spy.log:
>> 1080640877421|15|0|statement|DELETE FROM institution_contact WHERE 
>> institution_contact_id = ? |DELETE FROM institution_contact WHERE 
>> institution_contact_id = '1049080'
>> 1080640877421|0|0|statement|DELETE FROM contact WHERE contact_id = ? 
>> |DELETE FROM contact WHERE contact_id = '1049040'
>> 1080640877437|0|0|statement|DELETE FROM institution WHERE 
>> institution_id = ? |DELETE FROM institution WHERE institution_id = 
>> '1048857'
>>
>>
>>
>>
>>  >Hi Andreas,
>>
>>  >I made a quick test. It works for me. Did you replace the 
>> repository.dtd?
>>  >Can you post the source code snip?
>>
>>  >regards,
>>  >Armin
>>
>>
>>
>> Andreas Bohnert wrote:
>>
>>>
>>>
>>> hello everbody,
>>>
>>> today I checked out the rc6 cvs version and did some validation 
>>> tests on my application.
>>> I found out, that there is something going wrong, when I delete an 
>>> object.
>>>
>>> I have an decomposed n-m relation:
>>>
>>> CONTACT --------INSTITUTION_CONTACT ------- INSTITUTION
>>>
>>> when I delete an INSTITUTION_CONTACT the related INSTITUTION and the 
>>> CONTACT are deleted as well!!
>>> I have put an auto-delete=false in my metadata, so I don't see a 
>>> reason for that action.
>>>
>>> here is the metadata for INSTITUTION_CONTACT :
>>> class-descriptor
>>> class="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>>> table="institution_contact"
>>>
>>>>
>>> <field-descriptor id="0"
>>>   name="institutionContactId"
>>>   column="institution_contact_id"
>>>   jdbc-type="INTEGER"
>>>   primarykey="true"
>>>   autoincrement="true"
>>> />
>>> <field-descriptor id="1"
>>>   name="contactId"
>>>   column="contact_id"
>>>   jdbc-type="INTEGER"
>>> />
>>> <field-descriptor id="2"
>>>   name="institutionId"
>>>   column="institution_id"
>>>   jdbc-type="INTEGER"
>>> />
>>> <field-descriptor id="3"
>>>   name="isPublic"
>>>   column="isPublic"
>>>   jdbc-type="TINYINT"
>>> />
>>> <field-descriptor id="4"
>>>   name="contactPrivileges"
>>>   column="contactPrivileges"
>>>   jdbc-type="INTEGER"
>>> />
>>> <field-descriptor id="5"
>>>   name="sortHelp"
>>>   column="sortHelp"
>>>   jdbc-type="INTEGER"
>>> />
>>> <field-descriptor id="6"
>>>   name="updateTime"
>>>   column="updateTime"
>>>   jdbc-type="TIMESTAMP"
>>> />
>>>
>>>   <reference-descriptor
>>>    name="contact"
>>>    auto-retrieve="true"
>>>    auto-update="true"
>>>    auto-delete="false"
>>>    class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>>> >
>>>    <foreignkey field-ref="contactId"/>
>>> </reference-descriptor>
>>>
>>>   <reference-descriptor
>>>    name="institution"
>>>    auto-retrieve="true"
>>>    auto-update="true"
>>>    auto-delete="false"
>>>    class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>> >
>>>    <foreignkey field-ref="institutionId"/>
>>> </reference-descriptor>
>>>
>>>
>>> </class-descriptor>
>>>
>>>
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>>
>>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> <class-descriptor
>>   class="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>>   table="institution_contact"
>>
>>   <field-descriptor id="0"
>>     name="institutionContactId"
>>     column="institution_contact_id"
>>     jdbc-type="INTEGER"
>>     primarykey="true"
>>     autoincrement="true"
>>   />
>>   <field-descriptor id="1"
>>     name="contactId"
>>     column="contact_id"
>>     jdbc-type="INTEGER"
>>   />
>>   <field-descriptor id="2"
>>     name="institutionId"
>>     column="institution_id"
>>     jdbc-type="INTEGER"
>>   />
>>   <field-descriptor id="3"
>>     name="isPublic"
>>     column="isPublic"
>>     jdbc-type="TINYINT"
>>   />
>>   <field-descriptor id="4"
>>     name="contactPrivileges"
>>     column="contactPrivileges"
>>     jdbc-type="INTEGER"
>>   />
>>   <field-descriptor id="5"
>>     name="sortHelp"
>>     column="sortHelp"
>>     jdbc-type="INTEGER"
>>   />
>>   <field-descriptor id="6"
>>     name="updateTime"
>>     column="updateTime"
>>     jdbc-type="TIMESTAMP"
>>   />
>>
>>     <reference-descriptor
>>      name="contact"
>>      auto-retrieve="true"
>>      auto-update="true"
>>      auto-delete="false"
>>      class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>>   >
>>      <foreignkey field-ref="contactId"/>
>>   </reference-descriptor>
>>
>>     <reference-descriptor
>>      name="institution"
>>      auto-retrieve="true"
>>      auto-update="true"
>>      auto-delete="false"
>>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>   >
>>      <foreignkey field-ref="institutionId"/>
>>   </reference-descriptor>
>>
>>
>> </class-descriptor>
>>
>>
>> <class-descriptor
>>   class="at.weberhofer.eusoda.shared.orm.Contact"
>>   table="contact"
>>
>>   <field-descriptor id="1"
>>     name="contactId"
>>     column="contact_id"
>>     jdbc-type="INTEGER"
>>     primarykey="true"
>>     autoincrement="true"
>>   />
>>   <field-descriptor id="2"
>>     name="genderAppResKeyId"
>>     column="genderAppResKey_id"
>>     jdbc-type="INTEGER"
>>   />
>>   <field-descriptor id="3"
>>     name="descUserResKeyId"
>>     column="descUserResKey_id"
>>     jdbc-type="INTEGER"
>>   />
>>   <field-descriptor id="4"
>>     name="updateContactId"
>>     column="updateContact_id"
>>     jdbc-type="INTEGER"
>>   />
>>   <field-descriptor id="5"
>>     name="salutation"
>>     column="salutation"
>>     jdbc-type="VARCHAR"
>>   />
>>   <field-descriptor id="6"
>>     name="academicTitle"
>>     column="academicTitle"
>>     jdbc-type="VARCHAR"
>>   />
>>   <field-descriptor id="7"
>>     name="functionalTitle"
>>     column="functionalTitle"
>>     jdbc-type="VARCHAR"
>>   />
>>   <field-descriptor id="8"
>>     name="firstName"
>>     column="firstName"
>>     jdbc-type="VARCHAR"
>>   />
>>   <field-descriptor id="9"
>>     name="lastName"
>>     column="lastName"
>>     jdbc-type="VARCHAR"
>>   />
>>   <field-descriptor id="10"
>>     name="profession"
>>     column="profession"
>>     jdbc-type="VARCHAR"
>>   />
>>   <field-descriptor id="11"
>>     name="login"
>>     column="login"
>>     jdbc-type="VARCHAR"
>>   />
>>   <field-descriptor id="12"
>>     name="pwd"
>>     column="pwd"
>>     jdbc-type="VARCHAR"
>>   />
>>   <field-descriptor id="13"
>>     name="isRemoved"
>>     column="isRemoved"
>>     jdbc-type="TINYINT"
>>   />
>>   <field-descriptor id="14"
>>     name="isPopup"
>>     column="isPopup"
>>     jdbc-type="TINYINT"
>>   />
>>   <field-descriptor id="15"
>>     name="updateTime"
>>     column="updateTime"
>>     jdbc-type="TIMESTAMP"
>>   />
>>
>>   <reference-descriptor
>>      name="descUserResKey"
>>      auto-retrieve="false"
>>      auto-update="true"
>>      auto-delete="true"
>>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>>   >
>>      <foreignkey field-ref="descUserResKeyId"/>
>>   </reference-descriptor>
>>
>>   <reference-descriptor
>>      name="genderAppResKey"
>>      auto-retrieve="false"
>>      auto-update="false"
>>      auto-delete="false"
>>      class-ref="at.weberhofer.eusoda.shared.orm.AppResKey"
>>   >
>>      <foreignkey field-ref="genderAppResKeyId"/>
>>   </reference-descriptor>
>>
>>   <collection-descriptor
>>          name="institutionContacts"
>>          
>> element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>>          auto-retrieve="false"
>>          auto-update="false"
>>          auto-delete="false"
>>       >
>>       <inverse-foreignkey field-ref="contactId"/>
>>   </collection-descriptor>
>>
>>   <collection-descriptor
>>          name="contactAppResKey"
>>          
>> element-class-ref="at.weberhofer.eusoda.shared.orm.Contact_AppResKey"
>>          auto-retrieve="true"
>>          auto-update="true"
>>          auto-delete="false"
>>       >
>>       <inverse-foreignkey field-ref="contactId"/>
>>   </collection-descriptor>
>>
>>   <collection-descriptor
>>      name="contactRegions"
>>      element-class-ref="at.weberhofer.eusoda.shared.orm.Contact_Region"
>>      auto-retrieve="false"
>>      auto-update="false"
>>      auto-delete="false"
>>      >
>>      <inverse-foreignkey field-ref="contactId"/>
>>   </collection-descriptor>
>>
>> </class-descriptor>
>>
>> <class-descriptor
>>   class="at.weberhofer.eusoda.shared.orm.Institution"
>>   table="institution"
>>
>>   <field-descriptor id="1"
>>     name="institutionId"
>>     column="institution_id"
>>     jdbc-type="INTEGER"
>>     primarykey="true"
>>     autoincrement="true"
>>   />
>>   <field-descriptor id="2"
>>     name="topInstitutionId"
>>     column="topInstitution_id"
>>     jdbc-type="INTEGER"
>>   />
>>   <field-descriptor id="3"
>>     name="umbrellaInstitutionId"
>>     column="umbrellaInstitution_id"
>>     jdbc-type="INTEGER"
>>   />
>>   <field-descriptor id="4"
>>     name="createContactId"
>>     column="createContact_id"
>>     jdbc-type="INTEGER"
>>   />
>>   <field-descriptor id="5"
>>     name="updateContactId"
>>     column="updateContact_id"
>>     jdbc-type="INTEGER"
>>   />
>>   <field-descriptor id="6"
>>     name="instDescUserResKeyId"
>>     column="instDescUserResKey_id"
>>     jdbc-type="INTEGER"
>>   />
>>   <field-descriptor id="7"
>>     name="businessHoursUserResKeyId"
>>     column="businessHoursUserResKey_id"
>>     jdbc-type="INTEGER"
>>   />
>>   <field-descriptor id="8"
>>     name="instTypeAppResKeyId"
>>     column="instTypeAppResKey_id"
>>     jdbc-type="INTEGER"
>>   />
>>   <field-descriptor id="9"
>>     name="institution1"
>>     column="institution1"
>>     jdbc-type="VARCHAR"
>>   />
>>   <field-descriptor id="10"
>>     name="institution2"
>>     column="institution2"
>>     jdbc-type="VARCHAR"
>>   />
>>   <field-descriptor id="11"
>>     name="isPublic"
>>     column="isPublic"
>>     jdbc-type="TINYINT"
>>   />
>>   <field-descriptor id="12"
>>     name="infoInternal"
>>     column="infoInternal"
>>     jdbc-type="VARCHAR"
>>   />
>>   <field-descriptor id="13"
>>     name="foundationDate"
>>     column="foundationDate"
>>     jdbc-type="TIMESTAMP"
>>   />
>>   <field-descriptor id="14"
>>     name="sortHelp"
>>     column="sortHelp"
>>     jdbc-type="SMALLINT"
>>   />
>>   <field-descriptor id="15"
>>     name="isUmbrella"
>>     column="isUmbrella"
>>     jdbc-type="TINYINT"
>>   />
>>   <field-descriptor id="16"
>>     name="isRemoved"
>>     column="isRemoved"
>>     jdbc-type="TINYINT"
>>   />
>>   <field-descriptor id="17"
>>     name="createTime"
>>     column="createTime"
>>     jdbc-type="TIMESTAMP"
>>   />
>>   <field-descriptor id="18"
>>     name="updateTime"
>>     column="updateTime"
>>     jdbc-type="TIMESTAMP"
>>   />
>>
>>   <reference-descriptor
>>      name="instDescUserResKey"
>>      auto-retrieve="false"
>>      auto-update="true"
>>      auto-delete="true"
>>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>>      >
>>      <foreignkey field-ref="instDescUserResKeyId"/>
>>   </reference-descriptor>
>>
>>   <reference-descriptor
>>      name="businessHoursUserResKey"
>>      auto-retrieve="false"
>>      auto-update="true"
>>      auto-delete="true"
>>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>>      >
>>      <foreignkey field-ref="businessHoursUserResKeyId"/>
>>   </reference-descriptor>
>>
>>   <reference-descriptor
>>      name="instTypeAppResKey"
>>      auto-retrieve="false"
>>      auto-update="false"
>>      auto-delete="false"
>>      class-ref="at.weberhofer.eusoda.shared.orm.AppResKey"
>>      >
>>      <foreignkey field-ref="instTypeAppResKeyId"/>
>>   </reference-descriptor>
>>
>>   <reference-descriptor
>>      name="topInstitution"
>>      auto-retrieve="true"
>>      auto-update="true"
>>      auto-delete="false"
>>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>      >
>>      <foreignkey field-ref="topInstitutionId"/>
>>   </reference-descriptor>
>>
>>   <reference-descriptor
>>      name="umbrellaInstitution"
>>      auto-retrieve="true"
>>      auto-update="true"
>>      auto-delete="false"
>>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>>      >
>>      <foreignkey field-ref="umbrellaInstitutionId"/>
>>   </reference-descriptor>
>>
>>   <collection-descriptor
>>      name="institutionRegions"
>>      
>> element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Region"
>>      auto-retrieve="false"
>>      auto-update="true"
>>      auto-delete="false"
>>      >
>>      <inverse-foreignkey field-ref="institutionId"/>
>>   </collection-descriptor>
>>
>>   <collection-descriptor
>>          name="institutionContacts"
>>          
>> element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>>          auto-retrieve="false"
>>          auto-update="false"
>>          auto-delete="false"
>>       >
>>       <inverse-foreignkey field-ref="institutionId"/>
>>   </collection-descriptor>
>>
>> </class-descriptor>
>>
>>
>> ------------------------------------------------------------------------
>>
>> CREATE TABLE institution (
>>     institution_id integer DEFAULT 0 NOT NULL,
>>     topinstitution_id integer DEFAULT 0 NOT NULL,
>>     umbrellainstitution_id integer DEFAULT 0 NOT NULL,
>>     createcontact_id integer DEFAULT 0 NOT NULL,
>>     updatecontact_id integer DEFAULT 0 NOT NULL,
>>     instdescuserreskey_id integer DEFAULT 0 NOT NULL,
>>     businesshoursuserreskey_id integer DEFAULT 0 NOT NULL,
>>     insttypeappreskey_id integer DEFAULT 0 NOT NULL,
>>     institution1 character varying(120) DEFAULT ''::character varying 
>> NOT NULL,
>>     institution2 character varying(120) DEFAULT ''::character varying 
>> NOT NULL,
>>     ispublic smallint DEFAULT (1)::smallint NOT NULL,
>>     infointernal character varying(255) DEFAULT ''::character varying 
>> NOT NULL,
>>     foundationdate timestamp without time zone DEFAULT '0001-01-01 
>> 00:00:00'::timestamp without time zone,
>>     sorthelp smallint DEFAULT (0)::smallint NOT NULL,
>>     isumbrella smallint DEFAULT (0)::smallint NOT NULL,
>>     isremoved smallint DEFAULT (0)::smallint NOT NULL,
>>     createtime timestamp without time zone DEFAULT '0001-01-01 
>> 00:00:00'::timestamp without time zone NOT NULL,
>>     updatetime timestamp without time zone DEFAULT '0001-01-01 
>> 00:00:00'::timestamp without time zone NOT NULL
>> );
>>
>> ALTER TABLE ONLY institution
>>     ADD CONSTRAINT institution_pkey PRIMARY KEY (institution_id);
>>
>>
>>
>>
>> CREATE TABLE contact (
>>     contact_id integer DEFAULT 0 NOT NULL,
>>     descuserreskey_id integer DEFAULT 0 NOT NULL,
>>     updatecontact_id integer DEFAULT 0 NOT NULL,
>>     genderappreskey_id integer DEFAULT 0 NOT NULL,
>>     salutation character varying(80) DEFAULT ''::character varying 
>> NOT NULL,
>>     academictitle character varying(80) DEFAULT ''::character varying 
>> NOT NULL,
>>     functionaltitle character varying(80) DEFAULT ''::character 
>> varying NOT NULL,
>>     firstname character varying(80) DEFAULT ''::character varying NOT 
>> NULL,
>>     lastname character varying(80) DEFAULT ''::character varying NOT 
>> NULL,
>>     profession character varying(255) DEFAULT ''::character varying 
>> NOT NULL,
>>     login character varying(10) DEFAULT ''::character varying NOT NULL,
>>     pwd character varying(80) DEFAULT ''::character varying NOT NULL,
>>     isremoved smallint DEFAULT (0)::smallint NOT NULL,
>>     updatetime timestamp without time zone DEFAULT '0001-01-01 
>> 00:00:00'::timestamp without time zone NOT NULL,
>>     ispopup smallint DEFAULT 0
>> );
>>
>> ALTER TABLE ONLY contact
>>     ADD CONSTRAINT contact_pkey PRIMARY KEY (contact_id);
>>
>>
>>
>> CREATE TABLE institution_contact (
>>     institution_contact_id integer DEFAULT 0 NOT NULL,
>>     contact_id integer DEFAULT 0 NOT NULL,
>>     institution_id integer DEFAULT 0 NOT NULL,
>>     contactprivileges integer DEFAULT 0 NOT NULL,
>>     ispublic smallint,
>>     sorthelp integer DEFAULT 0 NOT NULL,
>>     updatetime timestamp without time zone DEFAULT '0001-01-01 
>> 00:00:00'::timestamp without time zone NOT NULL
>> );
>>
>> ALTER TABLE ONLY institution_contact
>>     ADD CONSTRAINT institution_contact_pkey PRIMARY KEY 
>> (institution_contact_id);
>>
>>
>> INSERT INTO institution VALUES (1048857, 1048817, 0, 0, 1, 1050040, 
>> 1050041, 40, 'Ebay', '', 1, 'internal', NULL, 0, 1, 0, '2004-03-22 
>> 16:03:25.609', '2004-03-30 11:48:29.046');
>> INSERT INTO contact VALUES (1049040, 0, 1, 35, '', '', '', '', 
>> 'deleteUser', '', 'du', '13A014CB9DE9F7CAD88D5DAFB70ECB41', 0, 
>> '2004-03-30 11:48:08.265', 0);
>> INSERT INTO institution_contact VALUES (1049080, 1049040, 1048857, 1, 
>> 0, 0, '2004-03-30 11:48:29.046');
>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> # OJB.properties -- configuration of the OJB runtime environment
>> # Version: 1.0
>> # (c) 2001, 2002, 2003 Apache Software Foundation
>> # Author: Thomas Mahler and many others
>> # @version $Id: OJB.properties,v 1.63 2004/03/24 13:58:01 tomdz Exp $
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # repository file settings
>> #---------------------------------------------------------------------------------------- 
>>
>> # The repositoryFile entry tells OJB to use this file as as its 
>> standard mapping
>> # repository. The file is looked up from the classpath.
>> #
>> repositoryFile=repository.xml
>> #
>> # If the useSerializedRepository entry is set to true, OJB tries to 
>> load a
>> # serialized version of the repository for performance reasons.
>> # if set to false, OJB always loads the xml file.
>> # Setting this flag to true will accelerate the startup sequence of OJB.
>> # If set to true changes to the repository.xml file will only be 
>> detected
>> # after maually deleting the repository.xml.serialized file.
>> useSerializedRepository=false
>> #
>> # If Repository serialization is used the entry 
>> serializedRepositoryPath defines the
>> # directory where the Repository is written to and read from.
>> # this entry is used only when the useSerializedRepository flag is 
>> set to true
>> #
>> serializedRepositoryPath=.
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # PersistenceBrokerFactory / PersistenceBroker
>> #---------------------------------------------------------------------------------------- 
>>
>> # The PersistenceBrokerFactoryClass entry decides which concrete
>> # PersistenceBrokerFactory implemention is to be used.
>> PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl 
>>
>> # If in managed environment *only* the PB-api was used it's 
>> recommended to use this factory
>> # to enable the PersistenceBroker instances to participate in the JTA 
>> transaction. This makes
>> # e.g. PBStateListener work properly in managed environments.
>> # eusoda
>> #PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl 
>>
>> #
>> #
>> # The PersistenceBrokerClass entry decides which concrete 
>> PersistenceBroker
>> # implementation is to be served by the PersistenceBrokerFactory.
>> # This is the singlevm implementation:
>> PersistenceBrokerClass=org.apache.ojb.broker.core.PersistenceBrokerImpl
>> #
>> # This is an implementation that uses Prevayler (prevayler.sf.net) as 
>> the persistent storage.
>> # Using this implementation OJB works as a simple OODBMS
>> #PersistenceBrokerClass=org.apache.ojb.broker.prevayler.PBPrevaylerImpl
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # PersistenceBroker pool
>> #---------------------------------------------------------------------------------------- 
>>
>> # PersistenceBroker pool configuration
>> # This pool uses the jakarta-commons-pool api.
>> # There you can find things described in detail.
>> #
>> # maximum number of brokers that can be borrowed from the
>> # pool at one time. When non-positive, there is no limit.
>> maxActive=100
>> #
>> # controls the maximum number of brokers that can sit idle in the
>> # pool (per key) at any time. When non-positive, there is no limit
>> maxIdle=-1
>> #
>> # max time block to get broker instance from pool, after that 
>> exception is thrown.
>> # When non-positive, block till last judgement
>> maxWait=2000
>> #
>> # indicates how long the eviction thread should sleep before "runs" 
>> of examining
>> # idle objects. When non-positive, no eviction thread will be launched.
>> timeBetweenEvictionRunsMillis=-1
>> #
>> # specifies the minimum amount of time that an broker may sit idle
>> # in the pool before it is eligable for eviction due to idle time.
>> # When non-positive, no object will be dropped from the pool due
>> # to idle time alone (depends on timeBetweenEvictionRunsMillis > 0)
>> minEvictableIdleTimeMillis=1000000
>> #
>> # specifies the behaviour of the pool when broker capacity is
>> # exhausted (see maxActive above)
>> # 0 - fail
>> # 1 - block
>> # 2 - grow
>> whenExhaustedAction=0
>> #
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # ConnectionFactory / Default ConnectionPool
>> #---------------------------------------------------------------------------------------- 
>>
>> # The ConnectionFactoryClass entry determines which kind of 
>> ConnectionFactory
>> # is to be used within org.apache.ojb as connection factory.
>> # A ConnectionFactory is responsible for creating
>> # JDBC Connections. Current version ships four implementations:
>> #
>> # 1. ConnectionFactoryNotPooledImpl
>> #    No pooling, no playing around.
>> #    Every connection request returns a new connection,
>> #    every connection release close the connection.
>> # 2. ConnectionFactoryPooledImpl
>> #    This implementation supports connection pooling.
>> # 3. ConnectionFactoryDBCPImpl
>> #    Using the jakarta-DBCP api for connection management, support
>> #    connection- and prepared statement-pooling, abandoned connection 
>> handling.
>> # 4. ConnectionFactoryManagedImpl
>> #    Connection factory for use within managed environments - e.g. 
>> JBoss.
>> #    Every obtained DataSource was wrapped within OJB (and ignore
>> #    e.g. con.commit() calls within OJB).
>> #    Use this implementation e.g if you use Datasources from an 
>> application server.
>> #
>> # Use the OJB performance tests to decide, which implementation is 
>> best for you.
>> # The proper way of obtaining a connection is configured in
>> # JDBCConnectionDescriptor entries in the repository.xml file.
>> # If want a more fine grained control of each connection pool used by 
>> OJB,
>> # take a look at the repository.dtd, there was a possibility to override
>> # this default connection factory entry in each 
>> JDBCConnectionDescriptor.
>> #
>> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl 
>>
>> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl 
>>
>> #eusoda
>> ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl 
>>
>> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl 
>>
>> #
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # ConnectionManager
>> #---------------------------------------------------------------------------------------- 
>>
>> # The ConnectionManagerClass entry defines the ConnectionManager 
>> implemementation to be used
>> ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl 
>>
>> #
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # SqlGenerator
>> #---------------------------------------------------------------------------------------- 
>>
>> # The SqlGeneratorClass entry defines the SqlGenerator 
>> implemementation to be used
>> SqlGeneratorClass=org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl 
>>
>> #
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # CollectionProxy class
>> #---------------------------------------------------------------------------------------- 
>>
>> # The optional CollectionProxy entry defines the class to be used for 
>> CollectionProxies
>> # if this entry is null org.apache.ojb.broker.accesslayer.ListProxy 
>> is used for Lists
>> # and org.apache.ojb.broker.accesslayer.CollectionProxy for Collections
>> #
>> #CollectionProxyClass=
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # StatementManager
>> #---------------------------------------------------------------------------------------- 
>>
>> # The StatementManagerClass entry defines the StatementManager 
>> implemementation to be used
>> StatementManagerClass=org.apache.ojb.broker.accesslayer.StatementManager
>> #
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # StatementsForClass
>> #---------------------------------------------------------------------------------------- 
>>
>> # The StatementsForClassClass entry defines the StatementsForClass 
>> implemementation to be used
>> # to implement cached statements.
>> StatementsForClassClass=org.apache.ojb.broker.accesslayer.StatementsForClassImpl 
>>
>> #
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # JdbcAccess
>> #---------------------------------------------------------------------------------------- 
>>
>> # The JdbcAccessClass entry defines the JdbcAccess implemementation 
>> to be used
>> JdbcAccessClass=org.apache.ojb.broker.accesslayer.JdbcAccessImpl
>> #
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # Object cache
>> #---------------------------------------------------------------------------------------- 
>>
>> # The ObjectCacheClass entry tells OJB which concrete ObjectCache
>> # implementation is to be used as standard cache.
>> # Its also possible to override this entry adding object-cache elements
>> # on jdbc-connection-descriptor level and
>> # per class-descriptor in repository file. More info see documentation.
>> #
>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl
>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheEmptyImpl
>> #eusoda
>> ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheJCSPerClassImpl
>> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerClassImpl
>> #
>> #
>> # This property is only relevant if the per class-descriptor 
>> object-cache
>> # declaration was used in conjunction with metadata runtime changes.
>> # If set 'flase' the class name of the object is used
>> # to find a per class ObjectCache implementation.
>> # If set 'true' the ObjectCacheDescriptor instance is used as key to
>> # find a per class ObjectCache, this enables to use different 
>> ObjectCache
>> # instances for the same class.
>> descriptorBasedCaches=false
>> #
>> #
>> # Use CacheFilters to do filter operations before caching methods were
>> # called. Build your own filter class by implementing 
>> org.apache.ojb.cache.CacheFilter.
>> # It is possible to use a arbitrary number of CacheFilters, but this 
>> slows
>> # down the performance of the cache, thus handle with care.
>> #
>> # - org.apache.ojb.broker.cache.CacheFilterClassImpl
>> # allows filtering of classes
>> # - org.apache.ojb.broker.cache.CacheFilterPackageImpl
>> # allows filtering of packages
>> # More info see Javadoc of the according classes.
>> # Set a comma separated list of CacheFilter.
>> #ObjectCacheFilter=org.apache.ojb.broker.cache.CacheFilterClassImpl,org.apache.ojb.broker.cache.CacheFilterPackageImpl 
>>
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # Locking
>> #---------------------------------------------------------------------------------------- 
>>
>> # The LockManagerClass entry tells OJB which concrete LockManager
>> # implementation is to be used.
>> LockManagerClass=org.apache.ojb.odmg.locking.LockManagerDefaultImpl
>> #
>> # The LockMapClass entry tells OJB which concrete LockMap
>> # implementation is to be used.
>> # If OJB is running on multiple concurrent clients it is recommended
>> # to use the RemoteLockMapImpl. It guarantees to provide
>> # Lockmanagement across multiple JVMs.
>> # This Implemenation relies on a Servlet based Lockserver. To use it 
>> you have to
>> # deploy the ojb-lockserver.war into a Servlet engine.
>> # and you have to set the Property LockServletUrl to point to this 
>> servlet.
>> # (see LockServletUrl section below).
>> # If OJB is running in a single JVM (e.g. in a desktop app, or in a 
>> servlet
>> # engine) it is save to use the InMemoryLockMapImpl. Using it will 
>> result
>> # in a large performance gain.
>> #LockMapClass=org.apache.ojb.odmg.locking.RemoteLockMapImpl
>> LockMapClass=org.apache.ojb.odmg.locking.InMemoryLockMapImpl
>> #
>> # The LockTimeout entry defines the maximum time in milliseconds
>> # that a lock may be hold. Defaults to 60000 = 1 minute
>> LockTimeout=60000
>> #
>> # The ImplicitLocking entry defines if implicit lock acquisition is
>> # to be used. If set to true OJB implicitely locks objects to ODMG
>> # transactions after performing OQL queries.
>> # If implicit locking is used locking objects is recursive, that is
>> # associated objects are also locked.
>> # If ImplicitLocking is set to false, no locks are obtained in OQL
>> # queries and there is also no recursive locking.
>> ImplicitLocking=true
>> #ImplicitLocking=false
>> #
>> #
>> # The LockServletUrl entry points to the Lockserver servlet.
>> # This Servlet is addressed by all distributed JVMs if the 
>> RemoteLockMapImpl
>> # is used.
>> LockServletUrl=http://127.0.0.1:8080/ojb-lockserver
>> #
>> #
>> # The LockAssociations entry defines the behaviour for the OJB
>> # implicit locking feature. If set to WRITE (default) acquiring a write-
>> # lock on a given object x implies write locks on all objects associated
>> # to x. If set to READ implicit read-locks are acquired.
>> # Acquiring a read-lock on x thus allways results in implicit read-locks
>> # on all associated objects.
>> #LockAssociations=READ
>> LockAssociations=WRITE
>> #
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # Logging
>> #---------------------------------------------------------------------------------------- 
>>
>> # The LoggerClass entry tells OJB which concrete Logger
>> # implementation is to be used.
>> #
>> # Commons-logging
>> #LoggerClass=org.apache.ojb.broker.util.logging.CommonsLoggerImpl
>> # log4j based logging
>> #eusoda
>> LoggerClass=org.apache.ojb.broker.util.logging.Log4jLoggerImpl
>> # OJB's own simple looging support
>> #LoggerClass=org.apache.ojb.broker.util.logging.PoorMansLoggerImpl
>> LoggerConfigFile=log4j.properties
>> #
>> # The LogLevel entries tells OJB which LogLevels are active
>> # for the different loggers used within OJB
>> # Loglevels: DEBUG < INFO < WARN < ERROR < FATAL
>> # That is loglevel WARN won't log DEBUG and INFO messages,
>> # but will log WARN, ERROR, and FATAL messages
>> #
>> # Global default log level used for all logging
>> # entities if not specified
>> ROOT.LogLevel=ERROR
>> #
>> # The Default Logger instance used within OJB
>> DEFAULT.LogLevel=WARN
>> # Logger for PersistenceBrokerImpl class
>> org.apache.ojb.broker.core.PersistenceBrokerImpl.LogLevel=WARN
>> # Logger for PersistenceBrokerFactory class 
>> PersistenceBrokerFactoryDefaultImpl
>> org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.LogLevel=WARN 
>>
>> # Logger for RepositoryXmlHandler, useful for debugging parsing of 
>> repository.xml!
>> # persistence capable object metadata
>> org.apache.ojb.broker.metadata.RepositoryXmlHandler.LogLevel=WARN
>> # Logger for ConnectionDescriptorXmlHandler, useful for debugging 
>> parsing of repository.xml!
>> # connection specific metadata
>> org.apache.ojb.broker.metadata.ConnectionDescriptorXmlHandler.LogLevel=WARN 
>>
>> # Logger for JdbcAccess, useful for debugging JDBC related problems
>> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.LogLevel=WARN
>> # Logger for RsIterator, useful for debugging problems with Object 
>> materialization
>> org.apache.ojb.broker.accesslayer.RsIterator.LogLevel=WARN
>> # Logger for StatementsForClass, useful for debugging JDBC Connection 
>> related problems
>> org.apache.ojb.broker.accesslayer.StatementsForClassImpl.LogLevel=WARN
>> # Logger for SqlGenerator, useful for debugging generation of SQL
>> org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.LogLevel=WARN 
>>
>> # Logger for RepositoryPersistor
>> org.apache.ojb.broker.metadata.RepositoryPersistor.LogLevel=WARN
>> # Logger for ConnectionFactory base class
>> org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.LogLevel=WARN 
>>
>> # Logger for ConnectionManager
>> org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.LogLevel=WARN
>> #
>> # Special Logger categories used in test suite and tutorials
>> #
>> # Logger for the ODMG Implementation
>> ODMG.LogLevel=DEBUG
>> # Logger for the JDO RI Implementation
>> JDO.LogLevel=DEBUG
>> # Logger for the performance tests
>> performance.LogLevel=INFO
>> # Logger for the soda api
>> soda.LogLevel=WARN
>> # Logger for the factory service
>> ConfigurableFactory.LogLevel=WARN
>> #
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # OQL / SQL settings
>> #---------------------------------------------------------------------------------------- 
>>
>> # The OqlCollectionClass entry defines the collection type returned
>> # from OQL queries. By default this value is set to DListImpl.
>> # This will be good for most situations as DList allows maximum 
>> flexibility
>> # in a ODMG environment. See also section 'ODMG settings'.
>> # Using DLists for large resultsets may be bad for application 
>> performance.
>> # For these scenarios you can use ArrayLists or Vectors.
>> # Important note: the collections class to be used MUST implement the
>> # interface org.apache.ojb.broker.ManageableCollection.
>> #
>> OqlCollectionClass=org.apache.ojb.odmg.collections.DListImpl_2
>> # 
>> OqlCollectionClass=org.apache.ojb.broker.util.collections.ManageableArrayList 
>>
>> # OqlCollectionClass=org.apache.ojb.broker.util.ManageableVector
>> #
>> # The SqlInLimit entry limits the number of values in IN-sql statement,
>> # -1 for no limits. This hint is used in Criteria.
>> SqlInLimit=200
>> #
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # ODMG settings
>> #---------------------------------------------------------------------------------------- 
>>
>> # Used ODMG collection implementation classes
>> # (e.g. when do a Implementation#newDlist() call)
>> #
>> # org.odmg.DList implementation class
>> DListClass=org.apache.ojb.odmg.collections.DListImpl_2
>> #DListClass=org.apache.ojb.odmg.collections.DListImpl
>> #
>> # org.odmg.DArray implementation class
>> DArrayClass=org.apache.ojb.odmg.collections.DListImpl_2
>> #DArrayClass=org.apache.ojb.odmg.collections.DListImpl
>> #
>> # org.odmg.DMap implementation class
>> DMapClass=org.apache.ojb.odmg.collections.DMapImpl
>> #
>> # org.odmg.DBag implementation class
>> DBagClass=org.apache.ojb.odmg.collections.DBagImpl
>> #
>> # org.odmg.DSet implementation class
>> DSetClass=org.apache.ojb.odmg.collections.DSetImpl
>> #
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # Meta data / mapping settings
>> #---------------------------------------------------------------------------------------- 
>>
>> # The PersistentFieldClass property defines the implementation class
>> # for PersistentField attributes used in the OJB MetaData layer.
>> # By default the best performing attribute/refection based 
>> implementation
>> # is selected (PersistentFieldDirectAccessImpl).
>> #
>> # - PersistentFieldDirectAccessImpl
>> #   is a high-speed version of the access strategies.
>> #   It does not cooperate with an AccessController,
>> #   but accesses the fields directly. Persistent
>> #   attributes don't need getters and setters
>> #   and don't have to be declared public or protected
>> # - PersistentFieldPrivilegedImpl
>> #   Same as above, but does cooperate with AccessController and do not
>> #   suppress the java language access check.
>> # - PersistentFieldIntrospectorImpl
>> #   uses JavaBeans compliant calls only to access persistent attributes.
>> #   No Reflection is needed. But for each attribute xxx there must be
>> #   public getXxx() and setXxx() methods.
>> # - PersistentFieldDynaBeanAccessImpl
>> #   implementation used to access a property from a
>> #   org.apache.commons.beanutils.DynaBean.
>> # - PersistentFieldAutoProxyImpl
>> #   for each field determines upon first access how to access this 
>> particular field
>> #   (directly, as a bean, as a dyna bean) and then uses that strategy
>> #
>> PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl 
>>
>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldPrivilegedImpl 
>>
>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldIntrospectorImpl 
>>
>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDynaBeanAccessImpl 
>>
>> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldAutoProxyImpl 
>>
>> #
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # Component Intercepting for Profiling and Tracing
>> #---------------------------------------------------------------------------------------- 
>>
>> # By enabling an InterceptorClass all OJB components will use
>> # this Interceptor. Interceptors allow advanced tracing and Profiling
>> # of all component method calls.
>> # This is currently an experimental feature useful only for OJB 
>> kernel developers.
>> #
>> #InterceptorClass=org.apache.ojb.broker.util.interceptor.TracingInterceptor 
>>
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # Transaction Management and assocation
>> #---------------------------------------------------------------------------------------- 
>>
>> # Use the LocalTxManager if you want the transaction to be associated 
>> by a thread
>> #OJBTxManagerClass=org.apache.ojb.odmg.LocalTxManager
>> # Use the JTATxManager if you want the transaction to be associated 
>> via the Transaction
>> # manager that is in your application server.
>> #eusoda
>> OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
>> #
>> # The TransactionManager is acquired in different ways dependent on 
>> the application server.
>> # The JTATransactionManagerClass property allows you to specify the 
>> class that implements
>> # the proper behaviour for finding the transaction manager. Only use 
>> when OJBTxManagerClass
>> # is set to a factory that uses the application server transaction 
>> manager
>> # (org.apache.ojb.odmg.JTATxManager)
>> #
>> # JBoss Transaction Manager Factory
>> JTATransactionManagerClass=org.apache.ojb.odmg.transaction.JBossTransactionManagerFactory 
>>
>> # Weblogic Transaction Manager Factory
>> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.WeblogicTransactionManagerFactory 
>>
>> # WebSphere transaction manager factory
>> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.WebSphereTransactionManagerFactory 
>>
>> # Orion transaction manager factory
>> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.OrionTransactionManagerFactory 
>>
>> #
>> #---------------------------------------------------------------------------------------- 
>>
>> # End of OJB.properties file
>> #---------------------------------------------------------------------------------------- 
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: auto-delete does not work anymore: rc6???

Posted by Armin Waibel <ar...@apache.org>.
Hi Andreas,

your code seems ok. Do you manipulate metadata at runtime? Maybe the 
auto-delete flag change at runtime. Can you check this in your 
deleteValidate(...)-method

Collection ords = 
broker.getClassDescriptor(Repository.class).getObjectReferenceDescriptors();
for(Iterator iterator = ords.iterator(); iterator.hasNext();)
{
    String str = ((ObjectReferenceDescriptor) iterator.next()).toXML();
    System.out.println(str);
}

and check if the auto-delete is really false (false == 17, true == 23)

regards,
Armin

Andreas Bohnert wrote:

> hello armin,
> 
> yes, I did replace the repository.dtd.
> I just simplified my application source. Here is the client/server code 
> that produce the wrong deletes.
> I'm using jboss 3.2.3 and postgresql 7.4.1.
> the repository files and the database structure is attached.
> 
> it's strange, because I think, the ojb junit testcase should cover this 
> situation, and it's also strange, that no one else complained
> thanks,
> andreas
> 
> ejb code:
> /**
>     * @ejb:interface-method
>     */
>    public void deleteValidate(Class dClass, Criteria crit) throws 
> Exception {
>        PersistenceBroker broker = getBroker();
>        Object o = null;
>        try {
>            Query query = QueryFactory.newQuery( dClass, crit, false 
> );                      o = broker.getObjectByQuery(query);
>            log.debug("object to delete: "+o);
>            broker.delete( o );
>        } catch (PersistenceBrokerException e) {
>            log.error("object could not be deleted: " + o);
>            throw new Exception(e);
>        }
>        broker.close();
>    }
>   client code:
>    public void deleteValidateClient() {
>        Criteria crit = new Criteria();
>        crit.addEqualTo("institution_contact_id", new Integer(1049080));
>        try {
>            OJBSessionRemote ojb = OjbUtil.getOJBSessionRemote();
>            ojb.deleteValidate( Institution_Contact.class, crit );
>        } catch (OJBLayerExc e) {
>            e.printStackTrace();
>        } catch (RemoteException e) {
>            e.printStackTrace();
>        } catch (Exception e) {
>            e.printStackTrace();
>        }
>    }
> 
> this is the resulting spy.log:
> 1080640877421|15|0|statement|DELETE FROM institution_contact WHERE 
> institution_contact_id = ? |DELETE FROM institution_contact WHERE 
> institution_contact_id = '1049080'
> 1080640877421|0|0|statement|DELETE FROM contact WHERE contact_id = ? 
> |DELETE FROM contact WHERE contact_id = '1049040'
> 1080640877437|0|0|statement|DELETE FROM institution WHERE institution_id 
> = ? |DELETE FROM institution WHERE institution_id = '1048857'
> 
> 
> 
> 
>  >Hi Andreas,
> 
>  >I made a quick test. It works for me. Did you replace the repository.dtd?
>  >Can you post the source code snip?
> 
>  >regards,
>  >Armin
> 
> 
> 
> Andreas Bohnert wrote:
> 
>>
>>
>> hello everbody,
>>
>> today I checked out the rc6 cvs version and did some validation tests 
>> on my application.
>> I found out, that there is something going wrong, when I delete an 
>> object.
>>
>> I have an decomposed n-m relation:
>>
>> CONTACT --------INSTITUTION_CONTACT ------- INSTITUTION
>>
>> when I delete an INSTITUTION_CONTACT the related INSTITUTION and the 
>> CONTACT are deleted as well!!
>> I have put an auto-delete=false in my metadata, so I don't see a 
>> reason for that action.
>>
>> here is the metadata for INSTITUTION_CONTACT :
>> class-descriptor
>> class="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>> table="institution_contact"
>>
>>>
>> <field-descriptor id="0"
>>   name="institutionContactId"
>>   column="institution_contact_id"
>>   jdbc-type="INTEGER"
>>   primarykey="true"
>>   autoincrement="true"
>> />
>> <field-descriptor id="1"
>>   name="contactId"
>>   column="contact_id"
>>   jdbc-type="INTEGER"
>> />
>> <field-descriptor id="2"
>>   name="institutionId"
>>   column="institution_id"
>>   jdbc-type="INTEGER"
>> />
>> <field-descriptor id="3"
>>   name="isPublic"
>>   column="isPublic"
>>   jdbc-type="TINYINT"
>> />
>> <field-descriptor id="4"
>>   name="contactPrivileges"
>>   column="contactPrivileges"
>>   jdbc-type="INTEGER"
>> />
>> <field-descriptor id="5"
>>   name="sortHelp"
>>   column="sortHelp"
>>   jdbc-type="INTEGER"
>> />
>> <field-descriptor id="6"
>>   name="updateTime"
>>   column="updateTime"
>>   jdbc-type="TIMESTAMP"
>> />
>>
>>   <reference-descriptor
>>    name="contact"
>>    auto-retrieve="true"
>>    auto-update="true"
>>    auto-delete="false"
>>    class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>> >
>>    <foreignkey field-ref="contactId"/>
>> </reference-descriptor>
>>
>>   <reference-descriptor
>>    name="institution"
>>    auto-retrieve="true"
>>    auto-update="true"
>>    auto-delete="false"
>>    class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>> >
>>    <foreignkey field-ref="institutionId"/>
>> </reference-descriptor>
>>
>>
>> </class-descriptor>
>>
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
>> For additional commands, e-mail: ojb-user-help@db.apache.org
>>
>>
> 
> 
> ------------------------------------------------------------------------
> 
> <class-descriptor
>   class="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>   table="institution_contact"
> 
>   <field-descriptor id="0"
>     name="institutionContactId"
>     column="institution_contact_id"
>     jdbc-type="INTEGER"
>     primarykey="true"
>     autoincrement="true"
>   />
>   <field-descriptor id="1"
>     name="contactId"
>     column="contact_id"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="2"
>     name="institutionId"
>     column="institution_id"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="3"
>     name="isPublic"
>     column="isPublic"
>     jdbc-type="TINYINT"
>   />
>   <field-descriptor id="4"
>     name="contactPrivileges"
>     column="contactPrivileges"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="5"
>     name="sortHelp"
>     column="sortHelp"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="6"
>     name="updateTime"
>     column="updateTime"
>     jdbc-type="TIMESTAMP"
>   />
> 
>     <reference-descriptor
>      name="contact"
>      auto-retrieve="true"
>      auto-update="true"
>      auto-delete="false"
>      class-ref="at.weberhofer.eusoda.shared.orm.Contact"
>   >
>      <foreignkey field-ref="contactId"/>
>   </reference-descriptor>
> 
>     <reference-descriptor
>      name="institution"
>      auto-retrieve="true"
>      auto-update="true"
>      auto-delete="false"
>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>   >
>      <foreignkey field-ref="institutionId"/>
>   </reference-descriptor>
> 
> 
> </class-descriptor>
> 
> 
> <class-descriptor
>   class="at.weberhofer.eusoda.shared.orm.Contact"
>   table="contact"
> 
>   <field-descriptor id="1"
>     name="contactId"
>     column="contact_id"
>     jdbc-type="INTEGER"
>     primarykey="true"
>     autoincrement="true"
>   />
>   <field-descriptor id="2"
>     name="genderAppResKeyId"
>     column="genderAppResKey_id"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="3"
>     name="descUserResKeyId"
>     column="descUserResKey_id"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="4"
>     name="updateContactId"
>     column="updateContact_id"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="5"
>     name="salutation"
>     column="salutation"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="6"
>     name="academicTitle"
>     column="academicTitle"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="7"
>     name="functionalTitle"
>     column="functionalTitle"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="8"
>     name="firstName"
>     column="firstName"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="9"
>     name="lastName"
>     column="lastName"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="10"
>     name="profession"
>     column="profession"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="11"
>     name="login"
>     column="login"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="12"
>     name="pwd"
>     column="pwd"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="13"
>     name="isRemoved"
>     column="isRemoved"
>     jdbc-type="TINYINT"
>   />
>   <field-descriptor id="14"
>     name="isPopup"
>     column="isPopup"
>     jdbc-type="TINYINT"
>   />
>   <field-descriptor id="15"
>     name="updateTime"
>     column="updateTime"
>     jdbc-type="TIMESTAMP"
>   />
> 
>   <reference-descriptor
>      name="descUserResKey"
>      auto-retrieve="false"
>      auto-update="true"
>      auto-delete="true"
>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>   >
>      <foreignkey field-ref="descUserResKeyId"/>
>   </reference-descriptor>
> 
>   <reference-descriptor
>      name="genderAppResKey"
>      auto-retrieve="false"
>      auto-update="false"
>      auto-delete="false"
>      class-ref="at.weberhofer.eusoda.shared.orm.AppResKey"
>   >
>      <foreignkey field-ref="genderAppResKeyId"/>
>   </reference-descriptor>
> 
>   <collection-descriptor
>          name="institutionContacts"
>          element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>          auto-retrieve="false"
>          auto-update="false"
>          auto-delete="false"
>       >
>       <inverse-foreignkey field-ref="contactId"/>
>   </collection-descriptor>
> 
>   <collection-descriptor
>          name="contactAppResKey"
>          element-class-ref="at.weberhofer.eusoda.shared.orm.Contact_AppResKey"
>          auto-retrieve="true"
>          auto-update="true"
>          auto-delete="false"
>       >
>       <inverse-foreignkey field-ref="contactId"/>
>   </collection-descriptor>
> 
>   <collection-descriptor
>      name="contactRegions"
>      element-class-ref="at.weberhofer.eusoda.shared.orm.Contact_Region"
>      auto-retrieve="false"
>      auto-update="false"
>      auto-delete="false"
>      >
>      <inverse-foreignkey field-ref="contactId"/>
>   </collection-descriptor>
> 
> </class-descriptor>
> 
> <class-descriptor
>   class="at.weberhofer.eusoda.shared.orm.Institution"
>   table="institution"
> 
>   <field-descriptor id="1"
>     name="institutionId"
>     column="institution_id"
>     jdbc-type="INTEGER"
>     primarykey="true"
>     autoincrement="true"
>   />
>   <field-descriptor id="2"
>     name="topInstitutionId"
>     column="topInstitution_id"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="3"
>     name="umbrellaInstitutionId"
>     column="umbrellaInstitution_id"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="4"
>     name="createContactId"
>     column="createContact_id"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="5"
>     name="updateContactId"
>     column="updateContact_id"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="6"
>     name="instDescUserResKeyId"
>     column="instDescUserResKey_id"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="7"
>     name="businessHoursUserResKeyId"
>     column="businessHoursUserResKey_id"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="8"
>     name="instTypeAppResKeyId"
>     column="instTypeAppResKey_id"
>     jdbc-type="INTEGER"
>   />
>   <field-descriptor id="9"
>     name="institution1"
>     column="institution1"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="10"
>     name="institution2"
>     column="institution2"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="11"
>     name="isPublic"
>     column="isPublic"
>     jdbc-type="TINYINT"
>   />
>   <field-descriptor id="12"
>     name="infoInternal"
>     column="infoInternal"
>     jdbc-type="VARCHAR"
>   />
>   <field-descriptor id="13"
>     name="foundationDate"
>     column="foundationDate"
>     jdbc-type="TIMESTAMP"
>   />
>   <field-descriptor id="14"
>     name="sortHelp"
>     column="sortHelp"
>     jdbc-type="SMALLINT"
>   />
>   <field-descriptor id="15"
>     name="isUmbrella"
>     column="isUmbrella"
>     jdbc-type="TINYINT"
>   />
>   <field-descriptor id="16"
>     name="isRemoved"
>     column="isRemoved"
>     jdbc-type="TINYINT"
>   />
>   <field-descriptor id="17"
>     name="createTime"
>     column="createTime"
>     jdbc-type="TIMESTAMP"
>   />
>   <field-descriptor id="18"
>     name="updateTime"
>     column="updateTime"
>     jdbc-type="TIMESTAMP"
>   />
> 
>   <reference-descriptor
>      name="instDescUserResKey"
>      auto-retrieve="false"
>      auto-update="true"
>      auto-delete="true"
>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>      >
>      <foreignkey field-ref="instDescUserResKeyId"/>
>   </reference-descriptor>
> 
>   <reference-descriptor
>      name="businessHoursUserResKey"
>      auto-retrieve="false"
>      auto-update="true"
>      auto-delete="true"
>      class-ref="at.weberhofer.eusoda.shared.orm.UserResKey"
>      >
>      <foreignkey field-ref="businessHoursUserResKeyId"/>
>   </reference-descriptor>
> 
>   <reference-descriptor
>      name="instTypeAppResKey"
>      auto-retrieve="false"
>      auto-update="false"
>      auto-delete="false"
>      class-ref="at.weberhofer.eusoda.shared.orm.AppResKey"
>      >
>      <foreignkey field-ref="instTypeAppResKeyId"/>
>   </reference-descriptor>
> 
>   <reference-descriptor
>      name="topInstitution"
>      auto-retrieve="true"
>      auto-update="true"
>      auto-delete="false"
>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>      >
>      <foreignkey field-ref="topInstitutionId"/>
>   </reference-descriptor>
> 
>   <reference-descriptor
>      name="umbrellaInstitution"
>      auto-retrieve="true"
>      auto-update="true"
>      auto-delete="false"
>      class-ref="at.weberhofer.eusoda.shared.orm.Institution"
>      >
>      <foreignkey field-ref="umbrellaInstitutionId"/>
>   </reference-descriptor>
> 
>   <collection-descriptor
>      name="institutionRegions"
>      element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Region"
>      auto-retrieve="false"
>      auto-update="true"
>      auto-delete="false"
>      >
>      <inverse-foreignkey field-ref="institutionId"/>
>   </collection-descriptor>
> 
>   <collection-descriptor
>          name="institutionContacts"
>          element-class-ref="at.weberhofer.eusoda.shared.orm.Institution_Contact"
>          auto-retrieve="false"
>          auto-update="false"
>          auto-delete="false"
>       >
>       <inverse-foreignkey field-ref="institutionId"/>
>   </collection-descriptor>
> 
> </class-descriptor>
> 
> 
> ------------------------------------------------------------------------
> 
> CREATE TABLE institution (
>     institution_id integer DEFAULT 0 NOT NULL,
>     topinstitution_id integer DEFAULT 0 NOT NULL,
>     umbrellainstitution_id integer DEFAULT 0 NOT NULL,
>     createcontact_id integer DEFAULT 0 NOT NULL,
>     updatecontact_id integer DEFAULT 0 NOT NULL,
>     instdescuserreskey_id integer DEFAULT 0 NOT NULL,
>     businesshoursuserreskey_id integer DEFAULT 0 NOT NULL,
>     insttypeappreskey_id integer DEFAULT 0 NOT NULL,
>     institution1 character varying(120) DEFAULT ''::character varying NOT NULL,
>     institution2 character varying(120) DEFAULT ''::character varying NOT NULL,
>     ispublic smallint DEFAULT (1)::smallint NOT NULL,
>     infointernal character varying(255) DEFAULT ''::character varying NOT NULL,
>     foundationdate timestamp without time zone DEFAULT '0001-01-01 00:00:00'::timestamp without time zone,
>     sorthelp smallint DEFAULT (0)::smallint NOT NULL,
>     isumbrella smallint DEFAULT (0)::smallint NOT NULL,
>     isremoved smallint DEFAULT (0)::smallint NOT NULL,
>     createtime timestamp without time zone DEFAULT '0001-01-01 00:00:00'::timestamp without time zone NOT NULL,
>     updatetime timestamp without time zone DEFAULT '0001-01-01 00:00:00'::timestamp without time zone NOT NULL
> );
> 
> ALTER TABLE ONLY institution
>     ADD CONSTRAINT institution_pkey PRIMARY KEY (institution_id);
> 
> 
> 
> 
> CREATE TABLE contact (
>     contact_id integer DEFAULT 0 NOT NULL,
>     descuserreskey_id integer DEFAULT 0 NOT NULL,
>     updatecontact_id integer DEFAULT 0 NOT NULL,
>     genderappreskey_id integer DEFAULT 0 NOT NULL,
>     salutation character varying(80) DEFAULT ''::character varying NOT NULL,
>     academictitle character varying(80) DEFAULT ''::character varying NOT NULL,
>     functionaltitle character varying(80) DEFAULT ''::character varying NOT NULL,
>     firstname character varying(80) DEFAULT ''::character varying NOT NULL,
>     lastname character varying(80) DEFAULT ''::character varying NOT NULL,
>     profession character varying(255) DEFAULT ''::character varying NOT NULL,
>     login character varying(10) DEFAULT ''::character varying NOT NULL,
>     pwd character varying(80) DEFAULT ''::character varying NOT NULL,
>     isremoved smallint DEFAULT (0)::smallint NOT NULL,
>     updatetime timestamp without time zone DEFAULT '0001-01-01 00:00:00'::timestamp without time zone NOT NULL,
>     ispopup smallint DEFAULT 0
> );
> 
> ALTER TABLE ONLY contact
>     ADD CONSTRAINT contact_pkey PRIMARY KEY (contact_id);
> 
> 
> 
> CREATE TABLE institution_contact (
>     institution_contact_id integer DEFAULT 0 NOT NULL,
>     contact_id integer DEFAULT 0 NOT NULL,
>     institution_id integer DEFAULT 0 NOT NULL,
>     contactprivileges integer DEFAULT 0 NOT NULL,
>     ispublic smallint,
>     sorthelp integer DEFAULT 0 NOT NULL,
>     updatetime timestamp without time zone DEFAULT '0001-01-01 00:00:00'::timestamp without time zone NOT NULL
> );
> 
> ALTER TABLE ONLY institution_contact
>     ADD CONSTRAINT institution_contact_pkey PRIMARY KEY (institution_contact_id);
> 
> 
> INSERT INTO institution VALUES (1048857, 1048817, 0, 0, 1, 1050040, 1050041, 40, 'Ebay', '', 1, 'internal', NULL, 0, 1, 0, '2004-03-22 16:03:25.609', '2004-03-30 11:48:29.046');
> INSERT INTO contact VALUES (1049040, 0, 1, 35, '', '', '', '', 'deleteUser', '', 'du', '13A014CB9DE9F7CAD88D5DAFB70ECB41', 0, '2004-03-30 11:48:08.265', 0);
> INSERT INTO institution_contact VALUES (1049080, 1049040, 1048857, 1, 0, 0, '2004-03-30 11:48:29.046');
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> # OJB.properties -- configuration of the OJB runtime environment
> # Version: 1.0
> # (c) 2001, 2002, 2003 Apache Software Foundation
> # Author: Thomas Mahler and many others
> # @version $Id: OJB.properties,v 1.63 2004/03/24 13:58:01 tomdz Exp $
> #
> #----------------------------------------------------------------------------------------
> # repository file settings
> #----------------------------------------------------------------------------------------
> # The repositoryFile entry tells OJB to use this file as as its standard mapping
> # repository. The file is looked up from the classpath.
> #
> repositoryFile=repository.xml
> #
> # If the useSerializedRepository entry is set to true, OJB tries to load a
> # serialized version of the repository for performance reasons.
> # if set to false, OJB always loads the xml file.
> # Setting this flag to true will accelerate the startup sequence of OJB.
> # If set to true changes to the repository.xml file will only be detected
> # after maually deleting the repository.xml.serialized file.
> useSerializedRepository=false
> #
> # If Repository serialization is used the entry serializedRepositoryPath defines the
> # directory where the Repository is written to and read from.
> # this entry is used only when the useSerializedRepository flag is set to true
> #
> serializedRepositoryPath=.
> #
> #----------------------------------------------------------------------------------------
> # PersistenceBrokerFactory / PersistenceBroker
> #----------------------------------------------------------------------------------------
> # The PersistenceBrokerFactoryClass entry decides which concrete
> # PersistenceBrokerFactory implemention is to be used.
> PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl
> # If in managed environment *only* the PB-api was used it's recommended to use this factory
> # to enable the PersistenceBroker instances to participate in the JTA transaction. This makes
> # e.g. PBStateListener work properly in managed environments.
> # eusoda
> #PersistenceBrokerFactoryClass=org.apache.ojb.broker.core.PersistenceBrokerFactorySyncImpl
> #
> #
> # The PersistenceBrokerClass entry decides which concrete PersistenceBroker
> # implementation is to be served by the PersistenceBrokerFactory.
> # This is the singlevm implementation:
> PersistenceBrokerClass=org.apache.ojb.broker.core.PersistenceBrokerImpl
> #
> # This is an implementation that uses Prevayler (prevayler.sf.net) as the persistent storage.
> # Using this implementation OJB works as a simple OODBMS
> #PersistenceBrokerClass=org.apache.ojb.broker.prevayler.PBPrevaylerImpl
> #
> #----------------------------------------------------------------------------------------
> # PersistenceBroker pool
> #----------------------------------------------------------------------------------------
> # PersistenceBroker pool configuration
> # This pool uses the jakarta-commons-pool api.
> # There you can find things described in detail.
> #
> # maximum number of brokers that can be borrowed from the
> # pool at one time. When non-positive, there is no limit.
> maxActive=100
> #
> # controls the maximum number of brokers that can sit idle in the
> # pool (per key) at any time. When non-positive, there is no limit
> maxIdle=-1
> #
> # max time block to get broker instance from pool, after that exception is thrown.
> # When non-positive, block till last judgement
> maxWait=2000
> #
> # indicates how long the eviction thread should sleep before "runs" of examining
> # idle objects. When non-positive, no eviction thread will be launched.
> timeBetweenEvictionRunsMillis=-1
> #
> # specifies the minimum amount of time that an broker may sit idle
> # in the pool before it is eligable for eviction due to idle time.
> # When non-positive, no object will be dropped from the pool due
> # to idle time alone (depends on timeBetweenEvictionRunsMillis > 0)
> minEvictableIdleTimeMillis=1000000
> #
> # specifies the behaviour of the pool when broker capacity is
> # exhausted (see maxActive above)
> # 0 - fail
> # 1 - block
> # 2 - grow
> whenExhaustedAction=0
> #
> #
> #----------------------------------------------------------------------------------------
> # ConnectionFactory / Default ConnectionPool
> #----------------------------------------------------------------------------------------
> # The ConnectionFactoryClass entry determines which kind of ConnectionFactory
> # is to be used within org.apache.ojb as connection factory.
> # A ConnectionFactory is responsible for creating
> # JDBC Connections. Current version ships four implementations:
> #
> # 1. ConnectionFactoryNotPooledImpl
> #    No pooling, no playing around.
> #    Every connection request returns a new connection,
> #    every connection release close the connection.
> # 2. ConnectionFactoryPooledImpl
> #    This implementation supports connection pooling.
> # 3. ConnectionFactoryDBCPImpl
> #    Using the jakarta-DBCP api for connection management, support
> #    connection- and prepared statement-pooling, abandoned connection handling.
> # 4. ConnectionFactoryManagedImpl
> #    Connection factory for use within managed environments - e.g. JBoss.
> #    Every obtained DataSource was wrapped within OJB (and ignore
> #    e.g. con.commit() calls within OJB).
> #    Use this implementation e.g if you use Datasources from an application server.
> #
> # Use the OJB performance tests to decide, which implementation is best for you.
> # The proper way of obtaining a connection is configured in
> # JDBCConnectionDescriptor entries in the repository.xml file.
> # If want a more fine grained control of each connection pool used by OJB,
> # take a look at the repository.dtd, there was a possibility to override
> # this default connection factory entry in each JDBCConnectionDescriptor.
> #
> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryPooledImpl
> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryNotPooledImpl
> #eusoda
> ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryManagedImpl
> #ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFactoryDBCPImpl
> #
> #
> #----------------------------------------------------------------------------------------
> # ConnectionManager
> #----------------------------------------------------------------------------------------
> # The ConnectionManagerClass entry defines the ConnectionManager implemementation to be used
> ConnectionManagerClass=org.apache.ojb.broker.accesslayer.ConnectionManagerImpl
> #
> #
> #----------------------------------------------------------------------------------------
> # SqlGenerator
> #----------------------------------------------------------------------------------------
> # The SqlGeneratorClass entry defines the SqlGenerator implemementation to be used
> SqlGeneratorClass=org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl
> #
> #
> #----------------------------------------------------------------------------------------
> # CollectionProxy class
> #----------------------------------------------------------------------------------------
> # The optional CollectionProxy entry defines the class to be used for CollectionProxies
> # if this entry is null org.apache.ojb.broker.accesslayer.ListProxy is used for Lists
> # and org.apache.ojb.broker.accesslayer.CollectionProxy for Collections
> #
> #CollectionProxyClass=
> #
> #----------------------------------------------------------------------------------------
> # StatementManager
> #----------------------------------------------------------------------------------------
> # The StatementManagerClass entry defines the StatementManager implemementation to be used
> StatementManagerClass=org.apache.ojb.broker.accesslayer.StatementManager
> #
> #
> #----------------------------------------------------------------------------------------
> # StatementsForClass
> #----------------------------------------------------------------------------------------
> # The StatementsForClassClass entry defines the StatementsForClass implemementation to be used
> # to implement cached statements.
> StatementsForClassClass=org.apache.ojb.broker.accesslayer.StatementsForClassImpl
> #
> #
> #----------------------------------------------------------------------------------------
> # JdbcAccess
> #----------------------------------------------------------------------------------------
> # The JdbcAccessClass entry defines the JdbcAccess implemementation to be used
> JdbcAccessClass=org.apache.ojb.broker.accesslayer.JdbcAccessImpl
> #
> #
> #----------------------------------------------------------------------------------------
> # Object cache
> #----------------------------------------------------------------------------------------
> # The ObjectCacheClass entry tells OJB which concrete ObjectCache
> # implementation is to be used as standard cache.
> # Its also possible to override this entry adding object-cache elements
> # on jdbc-connection-descriptor level and
> # per class-descriptor in repository file. More info see documentation.
> #
> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheDefaultImpl
> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheEmptyImpl
> #eusoda
> ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerBrokerImpl
> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCacheJCSPerClassImpl
> #ObjectCacheClass=org.apache.ojb.broker.cache.ObjectCachePerClassImpl
> #
> #
> # This property is only relevant if the per class-descriptor object-cache
> # declaration was used in conjunction with metadata runtime changes.
> # If set 'flase' the class name of the object is used
> # to find a per class ObjectCache implementation.
> # If set 'true' the ObjectCacheDescriptor instance is used as key to
> # find a per class ObjectCache, this enables to use different ObjectCache
> # instances for the same class.
> descriptorBasedCaches=false
> #
> #
> # Use CacheFilters to do filter operations before caching methods were
> # called. Build your own filter class by implementing org.apache.ojb.cache.CacheFilter.
> # It is possible to use a arbitrary number of CacheFilters, but this slows
> # down the performance of the cache, thus handle with care.
> #
> # - org.apache.ojb.broker.cache.CacheFilterClassImpl
> # allows filtering of classes
> # - org.apache.ojb.broker.cache.CacheFilterPackageImpl
> # allows filtering of packages
> # More info see Javadoc of the according classes.
> # Set a comma separated list of CacheFilter.
> #ObjectCacheFilter=org.apache.ojb.broker.cache.CacheFilterClassImpl,org.apache.ojb.broker.cache.CacheFilterPackageImpl
> #
> #----------------------------------------------------------------------------------------
> # Locking
> #----------------------------------------------------------------------------------------
> # The LockManagerClass entry tells OJB which concrete LockManager
> # implementation is to be used.
> LockManagerClass=org.apache.ojb.odmg.locking.LockManagerDefaultImpl
> #
> # The LockMapClass entry tells OJB which concrete LockMap
> # implementation is to be used.
> # If OJB is running on multiple concurrent clients it is recommended
> # to use the RemoteLockMapImpl. It guarantees to provide
> # Lockmanagement across multiple JVMs.
> # This Implemenation relies on a Servlet based Lockserver. To use it you have to
> # deploy the ojb-lockserver.war into a Servlet engine.
> # and you have to set the Property LockServletUrl to point to this servlet.
> # (see LockServletUrl section below).
> # If OJB is running in a single JVM (e.g. in a desktop app, or in a servlet
> # engine) it is save to use the InMemoryLockMapImpl. Using it will result
> # in a large performance gain.
> #LockMapClass=org.apache.ojb.odmg.locking.RemoteLockMapImpl
> LockMapClass=org.apache.ojb.odmg.locking.InMemoryLockMapImpl
> #
> # The LockTimeout entry defines the maximum time in milliseconds
> # that a lock may be hold. Defaults to 60000 = 1 minute
> LockTimeout=60000
> #
> # The ImplicitLocking entry defines if implicit lock acquisition is
> # to be used. If set to true OJB implicitely locks objects to ODMG
> # transactions after performing OQL queries.
> # If implicit locking is used locking objects is recursive, that is
> # associated objects are also locked.
> # If ImplicitLocking is set to false, no locks are obtained in OQL
> # queries and there is also no recursive locking.
> ImplicitLocking=true
> #ImplicitLocking=false
> #
> #
> # The LockServletUrl entry points to the Lockserver servlet.
> # This Servlet is addressed by all distributed JVMs if the RemoteLockMapImpl
> # is used.
> LockServletUrl=http://127.0.0.1:8080/ojb-lockserver
> #
> #
> # The LockAssociations entry defines the behaviour for the OJB
> # implicit locking feature. If set to WRITE (default) acquiring a write-
> # lock on a given object x implies write locks on all objects associated
> # to x. If set to READ implicit read-locks are acquired.
> # Acquiring a read-lock on x thus allways results in implicit read-locks
> # on all associated objects.
> #LockAssociations=READ
> LockAssociations=WRITE
> #
> #
> #----------------------------------------------------------------------------------------
> # Logging
> #----------------------------------------------------------------------------------------
> # The LoggerClass entry tells OJB which concrete Logger
> # implementation is to be used.
> #
> # Commons-logging
> #LoggerClass=org.apache.ojb.broker.util.logging.CommonsLoggerImpl
> # log4j based logging
> #eusoda
> LoggerClass=org.apache.ojb.broker.util.logging.Log4jLoggerImpl
> # OJB's own simple looging support
> #LoggerClass=org.apache.ojb.broker.util.logging.PoorMansLoggerImpl
> LoggerConfigFile=log4j.properties
> #
> # The LogLevel entries tells OJB which LogLevels are active
> # for the different loggers used within OJB
> # Loglevels: DEBUG < INFO < WARN < ERROR < FATAL
> # That is loglevel WARN won't log DEBUG and INFO messages,
> # but will log WARN, ERROR, and FATAL messages
> #
> # Global default log level used for all logging
> # entities if not specified
> ROOT.LogLevel=ERROR
> #
> # The Default Logger instance used within OJB
> DEFAULT.LogLevel=WARN
> # Logger for PersistenceBrokerImpl class
> org.apache.ojb.broker.core.PersistenceBrokerImpl.LogLevel=WARN
> # Logger for PersistenceBrokerFactory class PersistenceBrokerFactoryDefaultImpl
> org.apache.ojb.broker.core.PersistenceBrokerFactoryDefaultImpl.LogLevel=WARN
> # Logger for RepositoryXmlHandler, useful for debugging parsing of repository.xml!
> # persistence capable object metadata
> org.apache.ojb.broker.metadata.RepositoryXmlHandler.LogLevel=WARN
> # Logger for ConnectionDescriptorXmlHandler, useful for debugging parsing of repository.xml!
> # connection specific metadata
> org.apache.ojb.broker.metadata.ConnectionDescriptorXmlHandler.LogLevel=WARN
> # Logger for JdbcAccess, useful for debugging JDBC related problems
> org.apache.ojb.broker.accesslayer.JdbcAccessImpl.LogLevel=WARN
> # Logger for RsIterator, useful for debugging problems with Object materialization
> org.apache.ojb.broker.accesslayer.RsIterator.LogLevel=WARN
> # Logger for StatementsForClass, useful for debugging JDBC Connection related problems
> org.apache.ojb.broker.accesslayer.StatementsForClassImpl.LogLevel=WARN
> # Logger for SqlGenerator, useful for debugging generation of SQL
> org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.LogLevel=WARN
> # Logger for RepositoryPersistor
> org.apache.ojb.broker.metadata.RepositoryPersistor.LogLevel=WARN
> # Logger for ConnectionFactory base class
> org.apache.ojb.broker.accesslayer.ConnectionFactoryAbstractImpl.LogLevel=WARN
> # Logger for ConnectionManager
> org.apache.ojb.broker.accesslayer.ConnectionManagerImpl.LogLevel=WARN
> #
> # Special Logger categories used in test suite and tutorials
> #
> # Logger for the ODMG Implementation
> ODMG.LogLevel=DEBUG
> # Logger for the JDO RI Implementation
> JDO.LogLevel=DEBUG
> # Logger for the performance tests
> performance.LogLevel=INFO
> # Logger for the soda api
> soda.LogLevel=WARN
> # Logger for the factory service
> ConfigurableFactory.LogLevel=WARN
> #
> #
> #----------------------------------------------------------------------------------------
> # OQL / SQL settings
> #----------------------------------------------------------------------------------------
> # The OqlCollectionClass entry defines the collection type returned
> # from OQL queries. By default this value is set to DListImpl.
> # This will be good for most situations as DList allows maximum flexibility
> # in a ODMG environment. See also section 'ODMG settings'.
> # Using DLists for large resultsets may be bad for application performance.
> # For these scenarios you can use ArrayLists or Vectors.
> # Important note: the collections class to be used MUST implement the
> # interface org.apache.ojb.broker.ManageableCollection.
> #
> OqlCollectionClass=org.apache.ojb.odmg.collections.DListImpl_2
> # OqlCollectionClass=org.apache.ojb.broker.util.collections.ManageableArrayList
> # OqlCollectionClass=org.apache.ojb.broker.util.ManageableVector
> #
> # The SqlInLimit entry limits the number of values in IN-sql statement,
> # -1 for no limits. This hint is used in Criteria.
> SqlInLimit=200
> #
> #
> #----------------------------------------------------------------------------------------
> # ODMG settings
> #----------------------------------------------------------------------------------------
> # Used ODMG collection implementation classes
> # (e.g. when do a Implementation#newDlist() call)
> #
> # org.odmg.DList implementation class
> DListClass=org.apache.ojb.odmg.collections.DListImpl_2
> #DListClass=org.apache.ojb.odmg.collections.DListImpl
> #
> # org.odmg.DArray implementation class
> DArrayClass=org.apache.ojb.odmg.collections.DListImpl_2
> #DArrayClass=org.apache.ojb.odmg.collections.DListImpl
> #
> # org.odmg.DMap implementation class
> DMapClass=org.apache.ojb.odmg.collections.DMapImpl
> #
> # org.odmg.DBag implementation class
> DBagClass=org.apache.ojb.odmg.collections.DBagImpl
> #
> # org.odmg.DSet implementation class
> DSetClass=org.apache.ojb.odmg.collections.DSetImpl
> #
> #
> #----------------------------------------------------------------------------------------
> # Meta data / mapping settings
> #----------------------------------------------------------------------------------------
> # The PersistentFieldClass property defines the implementation class
> # for PersistentField attributes used in the OJB MetaData layer.
> # By default the best performing attribute/refection based implementation
> # is selected (PersistentFieldDirectAccessImpl).
> #
> # - PersistentFieldDirectAccessImpl
> #   is a high-speed version of the access strategies.
> #   It does not cooperate with an AccessController,
> #   but accesses the fields directly. Persistent
> #   attributes don't need getters and setters
> #   and don't have to be declared public or protected
> # - PersistentFieldPrivilegedImpl
> #   Same as above, but does cooperate with AccessController and do not
> #   suppress the java language access check.
> # - PersistentFieldIntrospectorImpl
> #   uses JavaBeans compliant calls only to access persistent attributes.
> #   No Reflection is needed. But for each attribute xxx there must be
> #   public getXxx() and setXxx() methods.
> # - PersistentFieldDynaBeanAccessImpl
> #   implementation used to access a property from a
> #   org.apache.commons.beanutils.DynaBean.
> # - PersistentFieldAutoProxyImpl
> #   for each field determines upon first access how to access this particular field
> #   (directly, as a bean, as a dyna bean) and then uses that strategy
> #
> PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDirectAccessImpl
> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldPrivilegedImpl
> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldIntrospectorImpl
> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldDynaBeanAccessImpl
> #PersistentFieldClass=org.apache.ojb.broker.metadata.fieldaccess.PersistentFieldAutoProxyImpl
> #
> #
> #----------------------------------------------------------------------------------------
> # Component Intercepting for Profiling and Tracing
> #----------------------------------------------------------------------------------------
> # By enabling an InterceptorClass all OJB components will use
> # this Interceptor. Interceptors allow advanced tracing and Profiling
> # of all component method calls.
> # This is currently an experimental feature useful only for OJB kernel developers.
> #
> #InterceptorClass=org.apache.ojb.broker.util.interceptor.TracingInterceptor
> #
> #----------------------------------------------------------------------------------------
> # Transaction Management and assocation
> #----------------------------------------------------------------------------------------
> # Use the LocalTxManager if you want the transaction to be associated by a thread
> #OJBTxManagerClass=org.apache.ojb.odmg.LocalTxManager
> # Use the JTATxManager if you want the transaction to be associated via the Transaction
> # manager that is in your application server.
> #eusoda
> OJBTxManagerClass=org.apache.ojb.odmg.JTATxManager
> #
> # The TransactionManager is acquired in different ways dependent on the application server.
> # The JTATransactionManagerClass property allows you to specify the class that implements
> # the proper behaviour for finding the transaction manager. Only use when OJBTxManagerClass
> # is set to a factory that uses the application server transaction manager
> # (org.apache.ojb.odmg.JTATxManager)
> #
> # JBoss Transaction Manager Factory
> JTATransactionManagerClass=org.apache.ojb.odmg.transaction.JBossTransactionManagerFactory
> # Weblogic Transaction Manager Factory
> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.WeblogicTransactionManagerFactory
> # WebSphere transaction manager factory
> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.WebSphereTransactionManagerFactory
> # Orion transaction manager factory
> #JTATransactionManagerClass=org.apache.ojb.odmg.transaction.OrionTransactionManagerFactory
> #
> #----------------------------------------------------------------------------------------
> # End of OJB.properties file
> #----------------------------------------------------------------------------------------
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


Re: auto-delete does not work anymore: rc6???

Posted by Andreas Bohnert <ab...@online.de>.
hello armin,

yes, I did replace the repository.dtd.
I just simplified my application source. Here is the client/server code 
that produce the wrong deletes.
I'm using jboss 3.2.3 and postgresql 7.4.1.
the repository files and the database structure is attached.

it's strange, because I think, the ojb junit testcase should cover this 
situation, and it's also strange, that no one else complained
thanks,
andreas

ejb code:
 /**
     * @ejb:interface-method
     */
    public void deleteValidate(Class dClass, Criteria crit) throws 
Exception {
        PersistenceBroker broker = getBroker();
        Object o = null;
        try {
            Query query = QueryFactory.newQuery( dClass, crit, false 
);           
            o = broker.getObjectByQuery(query);
            log.debug("object to delete: "+o);
            broker.delete( o );
        } catch (PersistenceBrokerException e) {
            log.error("object could not be deleted: " + o);
            throw new Exception(e);
        }
        broker.close();
    }
   
client code:
    public void deleteValidateClient() {
        Criteria crit = new Criteria();
        crit.addEqualTo("institution_contact_id", new Integer(1049080));
        try {
            OJBSessionRemote ojb = OjbUtil.getOJBSessionRemote();
            ojb.deleteValidate( Institution_Contact.class, crit );
        } catch (OJBLayerExc e) {
            e.printStackTrace();
        } catch (RemoteException e) {
            e.printStackTrace();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

this is the resulting spy.log:
1080640877421|15|0|statement|DELETE FROM institution_contact WHERE 
institution_contact_id = ? |DELETE FROM institution_contact WHERE 
institution_contact_id = '1049080'
1080640877421|0|0|statement|DELETE FROM contact WHERE contact_id = ? 
|DELETE FROM contact WHERE contact_id = '1049040'
1080640877437|0|0|statement|DELETE FROM institution WHERE institution_id 
= ? |DELETE FROM institution WHERE institution_id = '1048857'




 >Hi Andreas,

 >I made a quick test. It works for me. Did you replace the repository.dtd?
 >Can you post the source code snip?

 >regards,
 >Armin



Andreas Bohnert wrote:

>
>
> hello everbody,
>
> today I checked out the rc6 cvs version and did some validation tests 
> on my application.
> I found out, that there is something going wrong, when I delete an 
> object.
>
> I have an decomposed n-m relation:
>
> CONTACT --------INSTITUTION_CONTACT ------- INSTITUTION
>
> when I delete an INSTITUTION_CONTACT the related INSTITUTION and the 
> CONTACT are deleted as well!!
> I have put an auto-delete=false in my metadata, so I don't see a 
> reason for that action.
>
> here is the metadata for INSTITUTION_CONTACT :
> class-descriptor
> class="at.weberhofer.eusoda.shared.orm.Institution_Contact"
> table="institution_contact"
>
>>
> <field-descriptor id="0"
>   name="institutionContactId"
>   column="institution_contact_id"
>   jdbc-type="INTEGER"
>   primarykey="true"
>   autoincrement="true"
> />
> <field-descriptor id="1"
>   name="contactId"
>   column="contact_id"
>   jdbc-type="INTEGER"
> />
> <field-descriptor id="2"
>   name="institutionId"
>   column="institution_id"
>   jdbc-type="INTEGER"
> />
> <field-descriptor id="3"
>   name="isPublic"
>   column="isPublic"
>   jdbc-type="TINYINT"
> />
> <field-descriptor id="4"
>   name="contactPrivileges"
>   column="contactPrivileges"
>   jdbc-type="INTEGER"
> />
> <field-descriptor id="5"
>   name="sortHelp"
>   column="sortHelp"
>   jdbc-type="INTEGER"
> />
> <field-descriptor id="6"
>   name="updateTime"
>   column="updateTime"
>   jdbc-type="TIMESTAMP"
> />
>
>   <reference-descriptor
>    name="contact"
>    auto-retrieve="true"
>    auto-update="true"
>    auto-delete="false"
>    class-ref="at.weberhofer.eusoda.shared.orm.Contact"
> >
>    <foreignkey field-ref="contactId"/>
> </reference-descriptor>
>
>   <reference-descriptor
>    name="institution"
>    auto-retrieve="true"
>    auto-update="true"
>    auto-delete="false"
>    class-ref="at.weberhofer.eusoda.shared.orm.Institution"
> >
>    <foreignkey field-ref="institutionId"/>
> </reference-descriptor>
>
>
> </class-descriptor>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
>
>