spray-session icon indicating copy to clipboard operation
spray-session copied to clipboard

Im new here got some question

Open syscaday opened this issue 9 years ago • 4 comments

I'm using trait to runRoute all my route when i using newSession() { sessionId => it giving me this error message.

not enough arguments for method newSession: (magnet: spray.routing.session.directives.WithStatefulManagerMagnet[Unit,String])spray.routing.Directive1[String]. Unspecified value parameter magnet.

Thank you for assist.

syscaday avatar Nov 30 '15 04:11 syscaday

Hi,

You need an implicit session manager in scope. There exist three different managers by default:

See the examples and the session manager classes.

satabin avatar Nov 30 '15 07:11 satabin

Hi

On 30/11/2015 09:28, syscaday wrote:

great assist.. i success done it and.. but i still got one issue that one i run my service it error no matching constructor found on class com.sys.syscatech.spary.MyServiceActor for arguments []

This is more a problem of actor instantiation. How do you instantiate it? via configuration? via Props?

how i going to put the arguments for MyServiceActor(implicit val actorRefFactory: ActorSystem)

Thank you for assist.

— Reply to this email directly or view it on GitHub https://github.com/gnieh/spray-session/issues/9#issuecomment-160553561.

satabin avatar Nov 30 '15 18:11 satabin

I had solve that, tq very much..

i can't really understand on how to get current session from the request.. Can i get back my session from the same client request from server?

i try use session() but i get error

not enough arguments for method session: (magnet: spray.routing.session.directives.WithStatefulManagerMagnet[String,T])spray.routing.Directive1[Option[Map[String,T]]]. [error] Unspecified value parameter magnet. [error] session() { id =>

Thank you for assist.

syscaday avatar Dec 01 '15 03:12 syscaday

Is your session manager implicitly available in scope ?

satabin avatar Dec 01 '15 18:12 satabin