You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Eric Webb <er...@collectivegenius.net> on 2004/08/07 02:55:21 UTC
When does the service implementation get instantiated?
Hello all,
I have a quick question. I have a service implementation that needs
access to the HttpSession to complete it's business functions. (Not the
best design you see, business logic tied to the web tier, but it was all
done before I got here) :) So, somehow I need the session to get into
the service implementation. I know that one way to accomplish this is
to inside the service implementation, get the MessageContext and pull
the request/session from there. The only (small) qualm i have with that
is that it ties my implementation to Axis.
What i want to do is (and don't know if it's possible) is have a request
handler "inject" the session into the service impl by calling its
setHttpSession method. Is this possible? I have looked all around the
MessageContext object (in the source and at runtime) but I don't see an
instance of the service implementation class that i can manipulate. I
can get the Class object, but not an instance itself. Is the
implementation not instantiated until later down the processing line?
Thanks soo much for your help. This is my first stint into web
services, and it is quite exciting. Thanks for all your hard work.
cheers,
eric