Intercepting the persistance layer

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Intercepting the persistance layer

koenvdk
Hi,

Does anyone know an easy way to get my own persistance service provider in between the call to persistance and a call to one of the default persistance layers, like mysql?

I want to have the option to look at the crud or search request coming in, do some stuff, forward the request, get the response, do some more stuff, and then send the response back to the form runner.

It all comes down to placing a kind of wrapper around the persistance provider.



Thx



Koen







Overeenkomstig de bepalingen inzake de vertegenwoordiging van de vzw in haar statuten, kan enkel de gedelegeerde bestuurder, de algemeen directeur of zijn uitdrukkelijke lasthebber verbintenissen aangaan namens Smals.
Indien dit bericht niet voor u bestemd is, verzoeken wij u dit onmiddellijk aan ons te melden en het bericht te vernietigen.

Conformément aux dispositions relatives à la représentation de l'asbl dans ses statuts, seul l'administrateur délégué, le directeur général ou son mandataire exprès est habilité à souscrire des engagements au nom de Smals.
Si ce message ne vous est pas destiné, nous vous prions de nous le signaler immédiatement et de détruire le message.

According to the provisions regarding representation of the non profit association in its bylaws, only the chief executive officer, the general manager or his explicit agent can enter into engagements on behalf of Smals.
If you are not the addressee of this message, we kindly ask you to signal this to us immediately and to delete the message.





--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Intercepting the persistance layer

Erik Bruchez
Administrator
Koen,

I am not sure about an "easy" way, but Form Runner has a persistence proxy which does something like that:


It's written in Scala, and might serve as inspiration.

-Erik

On Tue, Mar 6, 2012 at 3:40 AM, <[hidden email]> wrote:
Hi,

Does anyone know an easy way to get my own persistance service provider in between the call to persistance and a call to one of the default persistance layers, like mysql?

I want to have the option to look at the crud or search request coming in, do some stuff, forward the request, get the response, do some more stuff, and then send the response back to the form runner.

It all comes down to placing a kind of wrapper around the persistance provider.



Thx



Koen







Overeenkomstig de bepalingen inzake de vertegenwoordiging van de vzw in haar statuten, kan enkel de gedelegeerde bestuurder, de algemeen directeur of zijn uitdrukkelijke lasthebber verbintenissen aangaan namens Smals.
Indien dit bericht niet voor u bestemd is, verzoeken wij u dit onmiddellijk aan ons te melden en het bericht te vernietigen.

Conformément aux dispositions relatives à la représentation de l'asbl dans ses statuts, seul l'administrateur délégué, le directeur général ou son mandataire exprès est habilité à souscrire des engagements au nom de Smals.
Si ce message ne vous est pas destiné, nous vous prions de nous le signaler immédiatement et de détruire le message.

According to the provisions regarding representation of the non profit association in its bylaws, only the chief executive officer, the general manager or his explicit agent can enter into engagements on behalf of Smals.
If you are not the addressee of this message, we kindly ask you to signal this to us immediately and to delete the message.






--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Intercepting the persistance layer

koenvdk
Thanks Eric,

I already looked at it and it looks like an interesting class. How does it get hooked into the system? What configuration settings make the form runner use it? (Or isn't it used? :-) ).
Would it be possible to make a subclass of it in a different project and configure orbeon to use it instead?

Thx!



Koen Vanderkimpen

Connect: Twitter





From:        Erik Bruchez <[hidden email]>
To:        [hidden email]
Date:        07/03/2012 06:29
Subject:        [ops-users] Re: Intercepting the persistance layer
Sent by:        [hidden email]





Koen,

I am not sure about an "easy" way, but Form Runner has a persistence proxy which does something like that:

https://github.com/orbeon/orbeon-forms/blob/master/src/scala/org/orbeon/oxf/fr/FormRunnerPersistenceProxy.scala

It's written in Scala, and might serve as inspiration.

-Erik

On Tue, Mar 6, 2012 at 3:40 AM, <Koen.Vanderkimpen@...> wrote:
Hi,

Does anyone know an easy way to get my own persistance service provider in between the call to persistance and a call to one of the default persistance layers, like mysql?


I want to have the option to look at the crud or search request coming in, do some stuff, forward the request, get the response, do some more stuff, and then send the response back to the form runner.


It all comes down to placing a kind of wrapper around the persistance provider.




Thx




Koen






Overeenkomstig de bepalingen inzake de vertegenwoordiging van de vzw in haar statuten, kan enkel de gedelegeerde bestuurder, de algemeen directeur of zijn uitdrukkelijke lasthebber verbintenissen aangaan namens Smals.
Indien dit bericht niet voor u bestemd is, verzoeken wij u dit onmiddellijk aan ons te melden en het bericht te vernietigen.

Conformément aux dispositions relatives à la représentation de l'asbl dans ses statuts, seul l'administrateur délégué, le directeur général ou son mandataire exprès est habilité à souscrire des engagements au nom de Smals.
Si ce message ne vous est pas destiné, nous vous prions de nous le signaler immédiatement et de détruire le message.

According to the provisions regarding representation of the non profit association in its bylaws, only the chief executive officer, the general manager or his explicit agent can enter into engagements on behalf of Smals.
If you are not the addressee of this message, we kindly ask you to signal this to us immediately and to delete the message.




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe:
[hidden email]
For general help:
[hidden email]
OW2 mailing lists service home page:
http://www.ow2.org/wws








Overeenkomstig de bepalingen inzake de vertegenwoordiging van de vzw in haar statuten, kan enkel de gedelegeerde bestuurder, de algemeen directeur of zijn uitdrukkelijke lasthebber verbintenissen aangaan namens Smals.
Indien dit bericht niet voor u bestemd is, verzoeken wij u dit onmiddellijk aan ons te melden en het bericht te vernietigen.

Conformément aux dispositions relatives à la représentation de l'asbl dans ses statuts, seul l'administrateur délégué, le directeur général ou son mandataire exprès est habilité à souscrire des engagements au nom de Smals.
Si ce message ne vous est pas destiné, nous vous prions de nous le signaler immédiatement et de détruire le message.

According to the provisions regarding representation of the non profit association in its bylaws, only the chief executive officer, the general manager or his explicit agent can enter into engagements on behalf of Smals.
If you are not the addressee of this message, we kindly ask you to signal this to us immediately and to delete the message.





--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: Intercepting the persistance layer

Erik Bruchez
Administrator
Koen,

Form runner now always talks to the persistence proxy whenever forms or data need to be read/written/updated/searched.

It's hooked-up here in the controller:


snd it simply runs this pipeline:


which in turn calls this processor:


which refers to the FormRunnerPersistenceProxy class.

So by modifying some of this yes, you could hook up another class.

-Erik

On Wed, Mar 7, 2012 at 1:26 AM, <[hidden email]> wrote:
Thanks Eric,

I already looked at it and it looks like an interesting class. How does it get hooked into the system? What configuration settings make the form runner use it? (Or isn't it used? :-) ).
Would it be possible to make a subclass of it in a different project and configure orbeon to use it instead?

Thx!



Koen Vanderkimpen

Connect: Twitter





From:        Erik Bruchez <[hidden email]>
To:        [hidden email]
Date:        07/03/2012 06:29
Subject:        [ops-users] Re: Intercepting the persistance layer
Sent by:        [hidden email]





Koen,

I am not sure about an "easy" way, but Form Runner has a persistence proxy which does something like that:

https://github.com/orbeon/orbeon-forms/blob/master/src/scala/org/orbeon/oxf/fr/FormRunnerPersistenceProxy.scala

It's written in Scala, and might serve as inspiration.

-Erik

On Tue, Mar 6, 2012 at 3:40 AM, <[hidden email]> wrote:
Hi,

Does anyone know an easy way to get my own persistance service provider in between the call to persistance and a call to one of the default persistance layers, like mysql?


I want to have the option to look at the crud or search request coming in, do some stuff, forward the request, get the response, do some more stuff, and then send the response back to the form runner.


It all comes down to placing a kind of wrapper around the persistance provider.




Thx




Koen






Overeenkomstig de bepalingen inzake de vertegenwoordiging van de vzw in haar statuten, kan enkel de gedelegeerde bestuurder, de algemeen directeur of zijn uitdrukkelijke lasthebber verbintenissen aangaan namens Smals.
Indien dit bericht niet voor u bestemd is, verzoeken wij u dit onmiddellijk aan ons te melden en het bericht te vernietigen.

Conformément aux dispositions relatives à la représentation de l'asbl dans ses statuts, seul l'administrateur délégué, le directeur général ou son mandataire exprès est habilité à souscrire des engagements au nom de Smals.
Si ce message ne vous est pas destiné, nous vous prions de nous le signaler immédiatement et de détruire le message.

According to the provisions regarding representation of the non profit association in its bylaws, only the chief executive officer, the general manager or his explicit agent can enter into engagements on behalf of Smals.
If you are not the addressee of this message, we kindly ask you to signal this to us immediately and to delete the message.




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe:
[hidden email]
For general help:
[hidden email]
OW2 mailing lists service home page:
http://www.ow2.org/wws








Overeenkomstig de bepalingen inzake de vertegenwoordiging van de vzw in haar statuten, kan enkel de gedelegeerde bestuurder, de algemeen directeur of zijn uitdrukkelijke lasthebber verbintenissen aangaan namens Smals.
Indien dit bericht niet voor u bestemd is, verzoeken wij u dit onmiddellijk aan ons te melden en het bericht te vernietigen.

Conformément aux dispositions relatives à la représentation de l'asbl dans ses statuts, seul l'administrateur délégué, le directeur général ou son mandataire exprès est habilité à souscrire des engagements au nom de Smals.
Si ce message ne vous est pas destiné, nous vous prions de nous le signaler immédiatement et de détruire le message.

According to the provisions regarding representation of the non profit association in its bylaws, only the chief executive officer, the general manager or his explicit agent can enter into engagements on behalf of Smals.
If you are not the addressee of this message, we kindly ask you to signal this to us immediately and to delete the message.






--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws