| [Transaction] createPrivilegedRunnable [message #84964] | 
Fri, 25 May 2007 10:51   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: james.willans.xactium.com 
 
Is it possible to enable an already running java thread to update  
resources within a transactional editing domain?  createPrivilegedRunnable  
seems to force you to start the thread that is returned, but the thread in  
question has already been started. 
 
Thanks, 
 
James
 |  
 |  
  | 
| Re: [Transaction] createPrivilegedRunnable [message #84998 is a reply to message #84964] | 
Fri, 25 May 2007 11:40    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: cdamus.ca.ibm.com 
 
Hi, James, 
 
Please use the EMF newsgroup (included in my reply) for questions about the 
Transaction component. 
 
The privileged runnable doesn't impose any restriction on when a client 
should start the thread that is to run the runnable.  
TransactionalEditingDomain::createPrivilegedRunnable() doesn't return a 
thread; it returns a runnable. 
 
To execute the runnable on a thread that is already in progress, you can use 
whatever means that thread provides.  The most common example is the 
display thread:  you would run the runnable on the display thread using 
Display::syncExec() on the Display object corresponding to the target 
thread. 
 
Note that it attempting to run the privileged runnable asynchronously (with 
respect to the thread that currently owns the transaction) is absolutely 
out of the question, as it will surely result in corruption of the 
transaction state. 
 
For more information, see the Programmer's Guide topic about sharing 
transactions between threads, which is new since 1.1 M7. 
 
HTH, 
 
Christian 
 
James Willans wrote: 
 
> Is it possible to enable an already running java thread to update 
> resources within a transactional editing domain?  createPrivilegedRunnable 
> seems to force you to start the thread that is returned, but the thread in 
> question has already been started. 
>  
> Thanks, 
>  
> James
 |  
 |  
  | 
| Re: [Transaction] createPrivilegedRunnable [message #85013 is a reply to message #84998] | 
Fri, 25 May 2007 11:40   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: cdamus.ca.ibm.com 
 
Oops ... forgot to redirect to the EMF newsgroup 
 
cW 
 
Christian W. Damus wrote: 
 
> Hi, James, 
>  
> Please use the EMF newsgroup (included in my reply) for questions about 
> the Transaction component. 
>  
> The privileged runnable doesn't impose any restriction on when a client 
> should start the thread that is to run the runnable. 
> TransactionalEditingDomain::createPrivilegedRunnable() doesn't return a 
> thread; it returns a runnable. 
>  
> To execute the runnable on a thread that is already in progress, you can 
> use 
> whatever means that thread provides.  The most common example is the 
> display thread:  you would run the runnable on the display thread using 
> Display::syncExec() on the Display object corresponding to the target 
> thread. 
>  
> Note that it attempting to run the privileged runnable asynchronously 
> (with respect to the thread that currently owns the transaction) is 
> absolutely out of the question, as it will surely result in corruption of 
> the transaction state. 
>  
> For more information, see the Programmer's Guide topic about sharing 
> transactions between threads, which is new since 1.1 M7. 
>  
> HTH, 
>  
> Christian 
>  
> James Willans wrote: 
>  
>> Is it possible to enable an already running java thread to update 
>> resources within a transactional editing domain?  
>> createPrivilegedRunnable seems to force you to start the thread that is 
>> returned, but the thread in question has already been started. 
>>  
>> Thanks, 
>>  
>> James
 |  
 |  
  | 
| Re: [Transaction] createPrivilegedRunnable [message #606796 is a reply to message #84964] | 
Fri, 25 May 2007 11:40   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: cdamus.ca.ibm.com 
 
Hi, James, 
 
Please use the EMF newsgroup (included in my reply) for questions about the 
Transaction component. 
 
The privileged runnable doesn't impose any restriction on when a client 
should start the thread that is to run the runnable.  
TransactionalEditingDomain::createPrivilegedRunnable() doesn't return a 
thread; it returns a runnable. 
 
To execute the runnable on a thread that is already in progress, you can use 
whatever means that thread provides.  The most common example is the 
display thread:  you would run the runnable on the display thread using 
Display::syncExec() on the Display object corresponding to the target 
thread. 
 
Note that it attempting to run the privileged runnable asynchronously (with 
respect to the thread that currently owns the transaction) is absolutely 
out of the question, as it will surely result in corruption of the 
transaction state. 
 
For more information, see the Programmer's Guide topic about sharing 
transactions between threads, which is new since 1.1 M7. 
 
HTH, 
 
Christian 
 
James Willans wrote: 
 
> Is it possible to enable an already running java thread to update 
> resources within a transactional editing domain?  createPrivilegedRunnable 
> seems to force you to start the thread that is returned, but the thread in 
> question has already been started. 
>  
> Thanks, 
>  
> James
 |  
 |  
  | 
| Re: [Transaction] createPrivilegedRunnable [message #606797 is a reply to message #84998] | 
Fri, 25 May 2007 11:40   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Originally posted by: cdamus.ca.ibm.com 
 
Oops ... forgot to redirect to the EMF newsgroup 
 
cW 
 
Christian W. Damus wrote: 
 
> Hi, James, 
>  
> Please use the EMF newsgroup (included in my reply) for questions about 
> the Transaction component. 
>  
> The privileged runnable doesn't impose any restriction on when a client 
> should start the thread that is to run the runnable. 
> TransactionalEditingDomain::createPrivilegedRunnable() doesn't return a 
> thread; it returns a runnable. 
>  
> To execute the runnable on a thread that is already in progress, you can 
> use 
> whatever means that thread provides.  The most common example is the 
> display thread:  you would run the runnable on the display thread using 
> Display::syncExec() on the Display object corresponding to the target 
> thread. 
>  
> Note that it attempting to run the privileged runnable asynchronously 
> (with respect to the thread that currently owns the transaction) is 
> absolutely out of the question, as it will surely result in corruption of 
> the transaction state. 
>  
> For more information, see the Programmer's Guide topic about sharing 
> transactions between threads, which is new since 1.1 M7. 
>  
> HTH, 
>  
> Christian 
>  
> James Willans wrote: 
>  
>> Is it possible to enable an already running java thread to update 
>> resources within a transactional editing domain?  
>> createPrivilegedRunnable seems to force you to start the thread that is 
>> returned, but the thread in question has already been started. 
>>  
>> Thanks, 
>>  
>> James
 |  
 |  
  | 
Powered by 
FUDForum. Page generated in 0.05028 seconds