Thank you very much for responding Thiago.

You write: "I'm afraid you're wrong about why the problem is happening.
Tapestry-IoC is the one actually taking care of services and it knows
nothing about ignored paths, which are a Tapestry(-core, the webapp)
thing. The problem is that your endpoint doesn't seem to be a Tapestry-IoC
service itself, so it
doesn't get any dependency injection done to it."

Perhaps my understanding of the problem is wrong, so please feel free to
correct me.  My endpoint service is configured to be autobuilt by the
bind() method in AppModule in the same way as other services I've created,
so I'd be surprised if Tapestry-IoC isn't recognising it as such.  What I
suspect is happening is that Tomcat, on receiving a WebSocket connection
request, is instantiating my endpoint but OUTSIDE of the Tapestry
application's context, meaning not only that any injected services never
get realised (they remain null), but also any class (static) field values
don't get shared across all instances of the endpoint class (those within
the registry versus those not).

So my solution was to have Tomcat get endpoint instances from the
Tapestry-IoC registry rather than instantiate them itself.  Hence the idea
of a custom Configurator, where I override the getEndpointInstance()
method to return an endpoint instance from the registry.

Interested in your thoughts on this.

Kind regards,

Chris.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to