Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Preprocessing on the CDO Server
[CDO] Preprocessing on the CDO Server [message #430217] Wed, 13 May 2009 15:06 Go to next message
Eclipse UserFriend
Originally posted by: maurice.gmail.com

Hi!

I'd like to find a way of doing some preprocessing on incoming models to
the CDO Server. Basically transforming the data, server-side, before the
commit attempt.

Is there an in-built mechanism on the server that I could exploit to this
end?

Thanks!

Maurice
Re: [CDO] Preprocessing on the CDO Server [message #430219 is a reply to message #430217] Wed, 13 May 2009 15:17 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

There are read and write interceptors you one can push into the server
which are consulted for every read/write.

I used them in my example application for EclipseCon [1] to control who
is allowed to write back and who isn't but I guess you can also use them
for other purposes.

Tom

[1] http://github.com/tomsontom/emf-databinding-example/blob/0ae 7faa67697a84171846852a5c5b0492d9a8f7d/org.eclipse.emf.exampl e.library.cdo.server/src/org/eclipse/emf/example/library/cdo /server/LibraryServerApplication.java

Maurice schrieb:
> Hi!
>
> I'd like to find a way of doing some preprocessing on incoming models to
> the CDO Server. Basically transforming the data, server-side, before the
> commit attempt.
> Is there an in-built mechanism on the server that I could exploit to
> this end?
>
> Thanks!
>
> Maurice
>
Re: [CDO] Preprocessing on the CDO Server [message #430224 is a reply to message #430219] Wed, 13 May 2009 16:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: maurice.gmail.com

Looks like what I need, thanks!

Maurice

Tom Schindl wrote:

> Hi,

> There are read and write interceptors you one can push into the server
> which are consulted for every read/write.

> I used them in my example application for EclipseCon [1] to control who
> is allowed to write back and who isn't but I guess you can also use them
> for other purposes.

> Tom

>
[1] http://github.com/tomsontom/emf-databinding-example/blob/0ae 7faa67697a84171846852a5c5b0492d9a8f7d/org.eclipse.emf.exampl e.library.cdo.server/src/org/eclipse/emf/example/library/cdo /server/LibraryServerApplication.java

> Maurice schrieb:
>> Hi!
>>
>> I'd like to find a way of doing some preprocessing on incoming models to
>> the CDO Server. Basically transforming the data, server-side, before the
>> commit attempt.
>> Is there an in-built mechanism on the server that I could exploit to
>> this end?
>>
>> Thanks!
>>
>> Maurice
>>
Re: [CDO] Preprocessing on the CDO Server [message #430258 is a reply to message #430224] Thu, 14 May 2009 10:56 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
This is a multi-part message in MIME format.
--------------030101080701070602000500
Content-Type: text/plain; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

Guys,

I'm not so sure if this mechanism (IRepository.WriteAccessHandler) is
what you're looking for! There's an important pont "hidden" in the JavaDocs:

| * @param commitContext
* The context of the commit operation that is to be executed against the backend store. The context can be
* used to *introspect *all aspects of the current commit operation.|



It's really only usable to *introspect* the objects and deltas. If you
were to change these informations before they're passed to the store
then you would probably at least corrupt the caches (and maybe more
general state) of the committing client. It could even be that the
repository caches get corrupted (I would have to look into the code, but
the first issue is a veto anyway).

We could consider an enhancement request.

Cheers
/Eike

----
http://thegordian.blogspot.com



Maurice schrieb:
> Looks like what I need, thanks!
>
> Maurice
>
> Tom Schindl wrote:
>
>> Hi,
>
>> There are read and write interceptors you one can push into the server
>> which are consulted for every read/write.
>
>> I used them in my example application for EclipseCon [1] to control who
>> is allowed to write back and who isn't but I guess you can also use them
>> for other purposes.
>
>> Tom
>
>>
> [1] http://github.com/tomsontom/emf-databinding-example/blob/0ae 7faa67697a84171846852a5c5b0492d9a8f7d/org.eclipse.emf.exampl e.library.cdo.server/src/org/eclipse/emf/example/library/cdo /server/LibraryServerApplication.java
>
>
>> Maurice schrieb:
>>> Hi!
>>>
>>> I'd like to find a way of doing some preprocessing on incoming
>>> models to
>>> the CDO Server. Basically transforming the data, server-side, before
>>> the
>>> commit attempt.
>>> Is there an in-built mechanism on the server that I could exploit to
>>> this end?
>>>
>>> Thanks!
>>>
>>> Maurice
>>>
>
>

--------------030101080701070602000500
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 8bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Guys,<br>
<br>
I'm not so sure if this mechanism (IRepository.WriteAccessHandler) is
what you're looking for! There's an important pont "hidden" in the
JavaDocs:<br>
<br>
<title></title>
<style type="text/css">
<!--code { font-family: Courier New, Courier; font-size: 10pt; margin: 0px; }-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- ======================================================== -->
<!-- = Java Sourcecode to HTML automatically converted code = --><!-- = Java2Html Converter 5.0 [2006-02-26] by Markus Gebhard markus@jave.de = -->
<!-- = Further information: http://www.java2html.de = -->
<div class="java" align="left">
<table bgcolor="#ffffff" border="0" cellpadding="3" cellspacing="0">
<tbody>
<tr>
<!-- start source code --> <td align="left" nowrap="nowrap"
valign="top"> <code><font color="#ffffff">


Previous Topic:Expand tree node upon recursive child creation
Next Topic:Steful packages
Goto Forum:
  


Current Time: Tue Apr 16 21:03:28 GMT 2024

Powered by FUDForum. Page generated in 1.22941 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top