On Fri, Nov 13, 2009 at 3:08 AM, oshyshko <[email protected]> wrote:

>
> David,
>
> > Your call to Service.say is outside the scope of the Lift HTTP request,
> so
> > it's not wrapped with the transaction management stuff.
>
> Exactly.
>
> The thing that I want LiftFilter to wrap "/messagebroker/*", so I will
> get per-HTTP request
> automatic transaction management and my code will remain clean.
>

Sorry.  You can either pass the request onto the Filter chain or handle it
in Lift.  You cannot do both.


>
> LiftFilter 0.9 and BlazeDS worked perfectly together,
> but when I switched to Lift 1.0 and greater, LiftFilter killed
> BlazeDS.
>

First, this sounds like a bug in Lift 0.9.  If Lift 0.9 was wrapping the
call to filter.chain in the Lift request context, that's definitely a bug in
Lift.

Second, Lift did not "kill" BlazeDS.  As I demonstrated, Lift is able to
pass the request down the filter chain to BlazeDS without impacting the
request or the request state in any way.


>
> Removing mappings from "web.xml" or adding
> "LiftRules.liftRequest.append { case Req("messagebroker" :: _, _, _)
> => false }"
> didn't really solved the problem but diverged it: BlazeDS is alive,
> but it made nice features of Lift useless.
>

They are not useless.  The issue you're facing is the the S context is not
available "around" your method calls.  If there's a way to extract the
JSESSIONID from BlazeDS, you can call SessionMaster.getSession(jsessionId,
Empty).  With the resulting session, you can call
S.initIfUninitted(foundSession) { your code here }

I don't know how BlazeDS works, but it may be possible to do something that
sets up this kind of context around the dispatch code and you'd have the
Lift session context and BlazeDS.


>
> I believe that these are attempts to cure symptoms while disease is
> still here: LiftFilter kills BlazeDS.
>

No, it most certainly does not.  Repeating that refrain is not helping
address the issue.


>
> It would be great to have a solution like this:
> - LiftFilter wraps "/messagebroker/*" but doesn't change requests, so
> BlazeDS servlet still working
> - methods like Service.say gain transaction management from Lift and
> its code remains clean
>

Unfortunately, without digging into BlazeDS, I can't help beyond the
suggestion above.

Thanks,

David


>
> --
> Oleksandr
>
> >
>


-- 
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Surf the harmonics

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to