uan Manuel Diaz Lara <
jmdia...@yahoo.com.invalid> wrote:
> Thanks for your reply to clarify, my version field is marked as the
> only field used for optimistic locking, and the entity was market too for
> optimistic locking, the problem was that I was expecting cayenne to manage
>
Thanks for your reply to clarify, my version field is marked as the only
field used for optimistic locking, and the entity was market too for optimistic
locking, the problem was that I was expecting cayenne to manage the version
field, but the only thing it does is to add the condition to
ty changed
the value of "units" in the database:
a) after your initial fetch and before your first commitChanges
b) after your first commitChanges and before your second commitChanges
If you aren't familiar with optimistic locking, in Cayenne Modeler make
sure you have "Optimist
updated after first commit, that is annoying because it break's the second
commit.
So the question is: what is the cayenne contract in relation to optimistic
locking ? what does it do ? only testing when committing ? does not update
version field nor refresh it from db when commiting ?
In my
(s.getUnits()+ 7);
context.commitChanges();
I have traced the log and I can see that the version field con s is not
updated after first commit, that is annoying because it break's the second
commit.
So the question is: what is the cayenne contract in relation to optimistic
locking ?
ich
wrote:
> perfect, thx!
>
>
> 2013/9/13 Mike Kienenberger
>
>> On Fri, Sep 13, 2013 at 3:56 AM, Markus Reich
>> wrote:
>> > is there a possibility to disalbe optimistic locking for certain entites
>> in
>> > runtime?`
>> > e.g. the user ge
There is an "Optimistic Locking?" checkbox for each ObjEntity in
CayenneModeler that will turn it on or off.
If you want to do it ad-hoc at runtime you have to catch the exception and
then refetch the problem object (possibly repeatedly) and re-apply the
changes. It's a little
perfect, thx!
2013/9/13 Mike Kienenberger
> On Fri, Sep 13, 2013 at 3:56 AM, Markus Reich
> wrote:
> > is there a possibility to disalbe optimistic locking for certain entites
> in
> > runtime?`
> > e.g. the user get's info that there's a optimistic l
On Fri, Sep 13, 2013 at 3:56 AM, Markus Reich
wrote:
> is there a possibility to disalbe optimistic locking for certain entites in
> runtime?`
> e.g. the user get's info that there's a optimistic locking problem, then
> the user can force the commit ignoring the optimistic
Hi,
is there a possibility to disalbe optimistic locking for certain entites in
runtime?`
e.g. the user get's info that there's a optimistic locking problem, then
the user can force the commit ignoring the optimistic lock?
regards
Markus
ch
> individual exceptions because most of my user community wouldn't
> understand an OptimisticLockException or any other kind of
> Exception and I don't need multiple catch blocks just to e-mail
> the developers the exception.
This *is* a handwavy way to deal with an optimistic locking situation
Hi Joachim,
It wasn't intended to be handwavy at all. If I'm writing a batch-type
job using Cayenne, I'm fine with it dying completely on a commit error
since it probably isn't safe to continue. For the web applications I
write, I catch Exception (anything) and inform the user that there was
a p
> The JavaDoc could be improved upon, certainly. There are a few
> exceptions that commitChanges() will throw, but you don't have
> to catch them if you don't want -- depends on your use.
> Of course, catching is usually nicer. :-)
Sorry, but that's just too handwavy.
For writing professional co
don't have to
catch them if you don't want -- depends on your use. Of course,
catching is usually nicer. :-)
On Tue, Feb 21, 2012 at 12:28 PM, Durchholz, Joachim
wrote:
>> 1) In Cayenne Modeler, select an ObjEntity (the Java class) and
>> under the Entity tab, turn Optimis
> 1) In Cayenne Modeler, select an ObjEntity (the Java class) and
> under the Entity tab, turn Optimistic Locking on. Then under
> the Attributes tab, turn Used for Locking on for each attribute
> you wish to lock on (you can do the same for Relationships if you
> desire).
Thanks
Hi Joachim,
I think you are over-complicating things.
1) In Cayenne Modeler, select an ObjEntity (the Java class) and under
the Entity tab, turn Optimistic Locking on. Then under the Attributes
tab, turn Used for Locking on for each attribute you wish to lock on
(you can do the same for
aves it to the application to
implement optimistic locking.
I'm not sure how to do that well with Cayenne. My approach would be:
1) lock all relevant rows
2) load the relevant rows as Cayenne entities
3) compare for differences with the unmodified state
4) if all goes well, trigger Cayenne'
;> Brief answer - Cayenne supports optimistic locking, how to apply it
>> (or any other locking technique) is for the user to decide.
>
> What's the approach to do optimistic locking in Cayenne?
> I have checked all chapters in the Cayenne 3.1 docs that seemed relevant, but
> came up empty.
> Brief answer - Cayenne supports optimistic locking, how to apply it
> (or any other locking technique) is for the user to decide.
What's the approach to do optimistic locking in Cayenne?
I have checked all chapters in the Cayenne 3.1 docs that seemed relevant, but
came up empty.
Ok Michael I got it. About the second email I misinterpreted the sentence.
Thanx a lot
Bruno
-Mensagem original-
De: Michael Gentry [mailto:mgen...@masslight.net]
Enviada: segunda-feira, 22 de Novembro de 2010 15:18
Para: user@cayenne.apache.org
Assunto: Re: Optimistic Locking 2
I
is smart enough to know which attributes changed
and only send those.
mrg
On Mon, Nov 22, 2010 at 6:00 AM, Bruno René Santos wrote:
> I was seeing the documentation about optimistic locking on Cayenne and this
> phrase:
>
>
>
> Cayenne is also smart enough to know which values
Hi Bruno,
When Cayenne throws an optimistic locking exception, it doesn't
automatically rollback changes in your objects. The commit to the
database failed. Whatever you had in memory stays the way you had it
and whatever was in the database is unaltered there.
mrg
On Mon, Nov 22, 2010
I was seeing the documentation about optimistic locking on Cayenne and this
phrase:
Cayenne is also smart enough to know which values have changed (only firstName)
and doesn't update the unchanged values.
Got me thinking... Does this means that if I change other fields (besides
firs
Hello all,
I have a doubt about optimistic locking. When the lock fails (concurrent access)
the DB transaction is rollbacked but what about the ObjectEntities? Are they
rollbacked too (with context.rollbackChanges())? The situation here is that I
wanted to do commit retries when the lock fails
Great. If you like, please make a task in our tracking system that we should
improve the UI in the modeler to disable the attribute lock options (or show a
warning) if the entity is not set to optimistic locking.
Thanks
Ari
On 1/11/10 3:22 AM, Paulo Andrade wrote:
OK, figured out what was
OK, figured out what was going on. There's a checkbox on Cayenne Modeler that
toggles optimistic locking for that entity on or off. I only had the attributes
marked for locking and didn't see that checkbox.
It is now throwing an OL exception as it should.
On Oct 30, 2010, at 3:53
asy to
> understand.
>
> Everything is so similar that I'm wondering that what I consider to be flaws
> in EOF also happen in Cayenne.
>
> For a long description of the problem here's a blog post:
>
> http://terminalapp.net/dr-optimistic-locking/
>
>
//terminalapp.net/dr-optimistic-locking/
The summary is this:
EOF stores snapshots in the ObjectStoreCoordinator which are shared by
EOEditingContexts (ObjectContexts in Cayenne), these snapshots are updated on
fetches (queries in Cayenne) and saves (commits in Cayenne).
So take an Cayenne application
Hi,
thanks, I already realized I didn't, I expected that it automatically
uses all fields, but this is better of course.
Hope it'll work now.
Regards,
--
Marek Šabo
On 04/11/2010 09:07 PM, Bryan Lewis wrote:
> Did you select any attribute to be "Used for Locking" in the modeler? In
> the Att
Did you select any attribute to be "Used for Locking" in the modeler? In
the Attributes view.
On Sun, Apr 11, 2010 at 1:40 PM, Marek Šabo wrote:
> Hi all,
>
> I would like to ask a question abou OL, I'm using cayenne filter along
> with wicket and I set OL through cayenne modeller and double-c
Hi all,
I would like to ask a question abou OL, I'm using cayenne filter along
with wicket and I set OL through cayenne modeller and double-checked in
xml (lock-type="optimistic" in obj-entity). But when I log in in two
different browser and try to update users information I don't get ol
exception
code doing the "set fields to lock/commit/reset fields".
You could not vary the locking on a specific entity within a specific
commit, but that's probably not a problem for your situation.
I did write the original optimistic locking code with Andrus' help,
but that was bac
for me?
>>
>> BTW: What's the best practice to implement this without getting problems in
>> the next Cayenne release?
>>
>>> On Fri, Nov 21, 2008 at 9:54 AM, BL <[EMAIL PROTECTED]> wrote:
>>>> the idea is to have a table related settin
I'm not sure if this will be helpful, but if you need to modify the
optimistic locking stuff at run-time, without effecting other things
using your map, then you might want to copy your DataMap:
http://cwiki.apache.org/CAY/copying-datamaps.html
You can use the original with the optim
; BTW: What's the best practice to implement this without getting problems in
> the next Cayenne release?
>
> Thanks for your help.
>
>> On Fri, Nov 21, 2008 at 9:54 AM, BL <[EMAIL PROTECTED]> wrote:
>>> the idea is to have a table related setting to request op
o implement this without getting problems in the
next Cayenne release?
Thanks for your help.
> On Fri, Nov 21, 2008 at 9:54 AM, BL <[EMAIL PROTECTED]> wrote:
>> the idea is to have a table related setting to request optimistic
>> locking for the changed properties only.
at 9:54 AM, BL <[EMAIL PROTECTED]> wrote:
> the idea is to have a table related setting to request optimistic
> locking for the changed properties only. This would allow shared write
> access for clients using a distinct set of fields.
>
> Without global support a customized U
the idea is to have a table related setting to request optimistic
locking for the changed properties only. This would allow shared write
access for clients using a distinct set of fields.
Without global support a customized UpdateBatchQueryBuilder could
do it probably locally, only access to the
Well, the other thing you can do is work with Interfaces everywhere,
then create POJO classes implementing your interface for non-persisted
objects. Don't know if that works any better for your particular
situation, though.
I've done this for a project with Cayenne, and I created cgen
templates
On Mon, 19 May 2008 10:47:31 -0400
"Mike Kienenberger" <[EMAIL PROTECTED]> wrote:
> But if Optimistic Locking is failing on a field, it comes down to the
> value in the application not being considered equal to the value read
> from the database.
I was suspecting somet
On Mon, 19 May 2008 10:59:56 -0400
"Mike Kienenberger" <[EMAIL PROTECTED]> wrote:
> If I were redoing it today, I'd probably consider a subclass of
> Ordering.
I think I will go that way as well... That is probably the easiest
solution and I am very sure that there will somewhen appear the next f
On Mon, 19 May 2008 11:07:11 -0400
"Mike Kienenberger" <[EMAIL PROTECTED]> wrote:
> I'm not really sure why you don't use a regular java bean object to do
> this.
Because of the base class. I don't want to have my renderer check the
class to decide how to handle it. What I could try would be to s
I'm not really sure why you don't use a regular java bean object to do this.
However, I believe you could create a DataMap for all of these objects
in a separate DataNode. You don't have to create a table for them in
the database.
You might even be able to get away with having them in the same
; I would like to have the 1.10.x numbers below the 1.2.x numbers. Which
> means I would like to sort mathematically and not alphabetically.
>
> Is there any possibility to tell Cayenne to sort differently? Or would I
> need to add a new (virtual) field to the DataObject with a clean sort
&g
It's probably better to use three separate emails.
I've seen issues with using Timestamp columns in Oracle and optimistic locking.
The problem was that the date stored in the database was rounded by
the JDBC driver.
The solution was to upgrade the JDBC driver when it was finally fi
On Mon, 19 May 2008 09:19:26 +1000
Aristedes Maniatis <[EMAIL PROTECTED]> wrote:
> There should be something coming soon with inheritance, but there were
> no plans to support persistent objects with no database backing at
> all. There is going to be the opposite concept: abstract classes whic
On 19/05/2008, at 12:09 AM, Adrian Wiesmann wrote:
We were discussing that on this list before. I am looking for a way to
generate DataObjects without a reference to a table in the database.
Something like a virtual DataObject.
My usage scenario is it to have a DataObject which can be bound to
ly and not alphabetically.
Is there any possibility to tell Cayenne to sort differently? Or would I
need to add a new (virtual) field to the DataObject with a clean sort
number and have Cayenne sort that field instead?
Optimistic Locking
--
My DataObjects contain a datetime f
Hey Folks,
thanks for your help - problem is solved - after unchecking the remote
notification all works as expected.
Regards, Jan
From: "Jan Lendholt" <[EMAIL PROTECTED]>
Reply-To: user@cayenne.apache.org
To: user@cayenne.apache.org
Subject: Re: Optimistic locking seems
om: "Michael Gentry" <[EMAIL PROTECTED]>
Reply-To: user@cayenne.apache.org
To: user@cayenne.apache.org
Subject: Re: Optimistic locking seems not to work
Date: Sat, 28 Jul 2007 07:44:52 -0400
Hi Jan,
When you configured your Data Domain in the Modeler, did you enable
Remote C
;
Reply-To: user@cayenne.apache.org
To: user@cayenne.apache.org
Subject: Re: Optimistic locking seems not to work
Date: Sat, 28 Jul 2007 07:44:52 -0400
Hi Jan,
When you configured your Data Domain in the Modeler, did you enable
Remote Change Notifications under the Cache Configuration?
Thanks,
/dev/mrg
On 7/28/
ception.
>
> But instead I get the following queries:
>
> INFO QueryLogger: UPDATE ACCESS.KUNDE SET NAME = ? WHERE KID = ? AND NAME =
> ?
> INFO QueryLogger: [bind: 'Test 2', 2133, 'Test 1']
>
> Where did cayenne get the new value for name which has been se
ogger: UPDATE ACCESS.KUNDE SET NAME = ? WHERE KID = ? AND NAME =
?
INFO QueryLogger: [bind: 'Test 2', 2133, 'Test 1']
Where did cayenne get the new value for name which has been set just a few
seconds before? Shouldn't cayene raise an excepption?
In the modeler I checked the o
7;child DC'.
-Original Message-
From: Michael Gentry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 11, 2007 3:03 PM
To: user@cayenne.apache.org
Subject: Re: Optimistic locking
Are you using caching?
http://cayenne.apache.org/doc20/object-caching.html
http://cayenne.apache.org
application.
I was doing test using two different browsers (Firefox + IE) in order to
avoid session management problem.
Your document describes the optimistic locking as a mechanism that
detects update done using an external application (SQL+, etc). For that
situation, regarding the Cayenne log
child DC. Is it the
source of the problem ?
In the application, I'm no dealing with thread. This is the job of the
application server. I'd like to avoid working with that stuff.
Regarding the getSnapshotVersion, I guess I should not use it for optimistic
locking check then ?
Thanks
hi marc,
if both threads are notified of the update, there should be no need of the
optimistic locking. you may use javas synchronization instead.
but i am somewhat surprised that two different data-contexts are notified of a
change of one object.
kind regards,
peter
-Ursprüngliche
Thank you for your reply.
For information, I'm working on a JSF web application.
I was doing test using two different browsers (Firefox + IE) in order to
avoid session management problem.
Your document describes the optimistic locking as a mechanism that
detects update done using an ext
ext -- I'm
assuming you are storing the DC in the session) with the updated values.
Try your test using different concurrent browsers, such as Firefox and
IE/Safari (for example) and see if you get the same results. I use
optimistic locking on pretty much everything and haven't noticed a pro
Hi,
I have some trouble with the optimistic locking function.
I set the 'optimistic locking' option to an ObjEntity and moreover I set
an attribute as "used for locking".
I'm in a web environment.
When I do some modification in a DataObject, the 'log&
60 matches
Mail list logo