I found the way to do this. I had to implement "ServiceLifecycle" interface for
my Web Service and provide implementation for init and destroy method.
private ServletEndpointContext mServletEndpointContext = null;
private ServletContext mServletContext = null;
public void init(Object context)
{
System.out.println("Init Called");
mServletEndpointContext = (ServletEndpointContext) context;
mServletContext = mServletEndpointContext.getServletContext();
}
/**
*
*/
public void destroy()
{
System.out.println("Destroy Called");
mServletEndpointContext = null;
mServletContext = null;
}
You can get the user prinicipal from ServletEndpointContext .
Cheers,
Sanjay
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3977150#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...