|
Re: [teneo]cascade lock [message #429306 is a reply to message #429297] |
Fri, 17 April 2009 16:35 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
Hi Thomas,
The cascade lock is placed if the JPA CascadeType.PERSIST is set on an annotation. This is done as a default if nothing
else is specified for an association. The JPA CascadeType.PERSIST is again translated in the hibernate PERSIST,
SAVE-UPDATE, LOCK cascades. It depends on your model and where you see the lock cascades appear for the best approach to
solve this:
- you can use the CASCADE_POLICY_ON_NON_CONTAINMENT, CASCADE_POLICY_ON_CONTAINMENT options, but then you can't select
the PERSIST cascade which you maybe want...
- or you can set the CascadeType annotation (is part of the hibernate annotations) on specific annotations
Let me know what does (not) work for you then we can see if the above solves it or if not what should be changed.
gr. Martin
Thomas wrote:
> When I am printing the hibernate configuration generated by teneo, I
> realize the some relations are defined with a cascade as lock.
> I don't understand why sometimes there is this kind of cascade, and some
> other times that is not.
> For our application, there are too many lock cascade definition, because
> of we arrive to some deadlock.
> Regards
>
> Thomas
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Re: [teneo]cascade lock [message #429407 is a reply to message #429306] |
Wed, 22 April 2009 13:54 |
Thomas Messages: 37 Registered: July 2009 |
Member |
|
|
Thank's Martin for your lights.
Is Teneo has been qualified with JBoss TreeCache ? Or do you advise
another second level hibernate cache ?
Martin Taal a écrit :
> Hi Thomas,
> The cascade lock is placed if the JPA CascadeType.PERSIST is set on an
> annotation. This is done as a default if nothing else is specified for
> an association. The JPA CascadeType.PERSIST is again translated in the
> hibernate PERSIST, SAVE-UPDATE, LOCK cascades. It depends on your model
> and where you see the lock cascades appear for the best approach to
> solve this:
> - you can use the CASCADE_POLICY_ON_NON_CONTAINMENT,
> CASCADE_POLICY_ON_CONTAINMENT options, but then you can't select the
> PERSIST cascade which you maybe want...
> - or you can set the CascadeType annotation (is part of the hibernate
> annotations) on specific annotations
>
> Let me know what does (not) work for you then we can see if the above
> solves it or if not what should be changed.
>
> gr. Martin
>
> Thomas wrote:
>> When I am printing the hibernate configuration generated by teneo, I
>> realize the some relations are defined with a cascade as lock.
>> I don't understand why sometimes there is this kind of cascade, and
>> some other times that is not.
>> For our application, there are too many lock cascade definition,
>> because of we arrive to some deadlock.
>> Regards
>>
>> Thomas
>
>
|
|
|
Re: [teneo]cascade lock [message #429408 is a reply to message #429407] |
Wed, 22 April 2009 14:08 |
Martin Taal Messages: 5468 Registered: July 2009 |
Senior Member |
|
|
I have used ehcache myself (but did not analyse it closely, it seems to work fine) and none of the others. So I can't
really comment on this.
gr. Martin
Thomas wrote:
> Thank's Martin for your lights.
> Is Teneo has been qualified with JBoss TreeCache ? Or do you advise
> another second level hibernate cache ?
>
> Martin Taal a écrit :
>> Hi Thomas,
>> The cascade lock is placed if the JPA CascadeType.PERSIST is set on an
>> annotation. This is done as a default if nothing else is specified for
>> an association. The JPA CascadeType.PERSIST is again translated in the
>> hibernate PERSIST, SAVE-UPDATE, LOCK cascades. It depends on your
>> model and where you see the lock cascades appear for the best approach
>> to solve this:
>> - you can use the CASCADE_POLICY_ON_NON_CONTAINMENT,
>> CASCADE_POLICY_ON_CONTAINMENT options, but then you can't select the
>> PERSIST cascade which you maybe want...
>> - or you can set the CascadeType annotation (is part of the hibernate
>> annotations) on specific annotations
>>
>> Let me know what does (not) work for you then we can see if the above
>> solves it or if not what should be changed.
>>
>> gr. Martin
>>
>> Thomas wrote:
>>> When I am printing the hibernate configuration generated by teneo, I
>>> realize the some relations are defined with a cascade as lock.
>>> I don't understand why sometimes there is this kind of cascade, and
>>> some other times that is not.
>>> For our application, there are too many lock cascade definition,
>>> because of we arrive to some deadlock.
>>> Regards
>>>
>>> Thomas
>>
>>
--
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: mtaal@springsite.com - mtaal@elver.org
Web: www.springsite.com - www.elver.org
|
|
|
Powered by
FUDForum. Page generated in 0.02948 seconds