cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Evgeny Ryabitskiy <evgeny.ryabits...@gmail.com>
Subject Re: Canceling long-running queries
Date Wed, 21 Oct 2009 09:29:13 GMT
Hello!
You can create separate DataContext and bind it to your separate
thread. Then you can stop you thread anytime.
 Also you can bind transaction to thread (if you want to rollback changes).

See:

1)http://cayenne.apache.org/doc20/api/cayenne/org/apache/cayenne/access/DataContext.html#createDataContext()

2)  http://cayenne.apache.org/doc20/api/cayenne/org/apache/cayenne/access/DataContext.html#bindThreadDataContext(org.apache.cayenne.access.DataContext)

3)  http://cayenne.apache.org/doc20/api/cayenne/org/apache/cayenne/access/Transaction.html#bindThreadTransaction(org.apache.cayenne.access.Transaction)

Evgeny Ryabitskiy



2009/10/20 Lawrence Gerstley <lawgers@gmail.com>:
> Hello,
>
> If you're using Cayenne as the ORM in a thick desktop client (e.g., RCP),
> and executing a long-running query, is there a Cayenne methodology for
> interrupting and canceling such a query, or would one just use normal
> threading?
>
> Thanks--Lawrence
>

Mime
View raw message