|
»
Is there any filter/interceptor implementation in RIFE?
|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Is there any filter/interceptor implementation in RIFE?I'm building a web site using RIFE and Hibernate. One of the famous pattern of using Hibernate is open session in view which is done with servlet-container filter. I wonder if it's possible to implement this purely in RIFE without setting up any servlet filter. Thanks in advance for your help. Kind regards, Daniel K. Nyoto --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "rife-users" group. To post to this group, send email to rife-users@... To unsubscribe from this group, send email to rife-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/rife-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Is there any filter/interceptor implementation in RIFE?Hi Daniel, there's nothing that replaces a servlet filter in RIFE. There's no concept of invocation chain or 'around' wrapping. The only thing that you can do, if you really don't want to use filters, is to create a base element class that implements processElement and create an abstract method in that class that is called from within processElement. You can then do the 'around' logic in there. Your other elements can then extend that base element and implement that abstract method. Hope this helps, Geert On Sun, Apr 20, 2008 at 11:07 AM, Daniel K. Nyoto <dnyoto@...> wrote: > > Hi Guys, > > I'm building a web site using RIFE and Hibernate. One of the famous pattern > of using Hibernate is open session in view which is done with > servlet-container filter. I wonder if it's possible to implement this purely > in RIFE without setting up any servlet filter. > > Thanks in advance for your help. > > Kind regards, > Daniel K. Nyoto > > > > -- Geert Bevin Terracotta - http://www.terracotta.org Uwyn "Use what you need" - http://uwyn.com RIFE Java application framework - http://rifers.org Music and words - http://gbevin.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "rife-users" group. To post to this group, send email to rife-users@... To unsubscribe from this group, send email to rife-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/rife-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Is there any filter/interceptor implementation in RIFE?Thanks for your reply. If I understand your explanation correctly, the implication of using your solution is that the main method for processing element in every other element cannot not be in "processElement" anymore, am I right? Well, it's not bad, but I'm just used to do the logic in "processElement". Daniel > Date: Mon, 21 Apr 2008 10:32:53 +0200 > From: gbevin@... > To: rife-users@... > Subject: [rife-users] Re: Is there any filter/interceptor implementation in RIFE? > > > Hi Daniel, > > there's nothing that replaces a servlet filter in RIFE. There's no > concept of invocation chain or 'around' wrapping. The only thing that > you can do, if you really don't want to use filters, is to create a > base element class that implements processElement and create an > abstract method in that class that is called from within > processElement. You can then do the 'around' logic in there. Your > other elements can then extend that base element and implement that > abstract method. > > Hope this helps, > > Geert > > On Sun, Apr 20, 2008 at 11:07 AM, Daniel K. Nyoto <dnyoto@...> wrote: > > > > Hi Guys, > > > > I'm building a web site using RIFE and Hibernate. One of the famous pattern > > of using Hibernate is open session in view which is done with > > servlet-container filter. I wonder if it's possible to implement this purely > > in RIFE without setting up any servlet filter. > > > > Thanks in advance for your help. > > > > Kind regards, > > Daniel K. Nyoto > > > > > > > > > > > -- > Geert Bevin > Terracotta - http://www.terracotta.org > Uwyn "Use what you need" - http://uwyn.com > RIFE Java application framework - http://rifers.org > Music and words - http://gbevin.com > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to rife-users@... To unsubscribe from this group, send email to rife-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/rife-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Is there any filter/interceptor implementation in RIFE?Yes, that's correct, or you can use a regular servlet filter. I've been considering adding 'after' behavior to the RIFE site structure, just like the 'pre' behavior, but I'm not 100% sold on it. Another option would be to support 'unrolling' of the inherits functionality when it goes back up the child stack in the reverse fashion, but I'm not sold too much on that either. These have both been in my mind for many years, but I could never find a compelling reason to add them. On 25 Apr 2008, at 20:31, Daniel K. Nyoto wrote: > Hi Geert, > > Thanks for your reply. If I understand your explanation correctly, > the implication of using your solution is that the main method for > processing element in every other element cannot not be in > "processElement" anymore, am I right? Well, it's not bad, but I'm > just used to do the logic in "processElement". > > Daniel > > > Date: Mon, 21 Apr 2008 10:32:53 +0200 > > From: gbevin@... > > To: rife-users@... > > Subject: [rife-users] Re: Is there any filter/interceptor > implementation in RIFE? > > > > > > Hi Daniel, > > > > there's nothing that replaces a servlet filter in RIFE. There's no > > concept of invocation chain or 'around' wrapping. The only thing > that > > you can do, if you really don't want to use filters, is to create a > > base element class that implements processElement and create an > > abstract method in that class that is called from within > > processElement. You can then do the 'around' logic in there. Your > > other elements can then extend that base element and implement that > > abstract method. > > > > Hope this helps, > > > > Geert > > > > On Sun, Apr 20, 2008 at 11:07 AM, Daniel K. Nyoto <dnyoto@... > > wrote: > > > > > > Hi Guys, > > > > > > I'm building a web site using RIFE and Hibernate. One of the > famous pattern > > > of using Hibernate is open session in view which is done with > > > servlet-container filter. I wonder if it's possible to implement > this purely > > > in RIFE without setting up any servlet filter. > > > > > > Thanks in advance for your help. > > > > > > Kind regards, > > > Daniel K. Nyoto > > > > > > > > > > > > > > > > > > -- > > Geert Bevin > > Terracotta - http://www.terracotta.org > > Uwyn "Use what you need" - http://uwyn.com > > RIFE Java application framework - http://rifers.org > > Music and words - http://gbevin.com > > > > > > -- Geert Bevin Terracotta - http://www.terracotta.org Uwyn "Use what you need" - http://uwyn.com RIFE Java application framework - http://rifers.org Music and words - http://gbevin.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "rife-users" group. To post to this group, send email to rife-users@... To unsubscribe from this group, send email to rife-users-unsubscribe@... For more options, visit this group at http://groups.google.com/group/rife-users?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free embeddable forum powered by Nabble | Forum Help |
