CometActors are asynchronous components that live beyond the scope of
a given request. From a CometActor you can have access to LiftSession
or SessionVars meaning that you could potentially "store" the "last-
seen" from the last request host name in a SessionVar an then access
it anytime from your actor.

Not sure why you need the hostName from inside an actor but you know
best what application you are building.

Br's,
Marius

On May 25, 9:39 pm, Bryan <germ...@gmail.com> wrote:
> How can I give an Actor access to S?  I need this for adding results
> to a SessionVar of a HashMap.
>
> If I call show() directly, then I see "localhost" logged.  If I call
> show() from within an actor, then it logs "nowhere_123.com":
> listener ! 'show.
>
> val listener: Actor = actor {
>   loop {
>     react {
>       case 'show => show()
>     }
>   }
>
> }
>
> def show() {
>   Log.info("show's host name: " + S.hostName)
>
> }
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to liftweb@googlegroups.com
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to