// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
package test;

import javax.xml.rpc.server.*; 

public class Test implements ServiceLifecycle {
    private int v;
    private ServletEndpointContext wsctx;
    public void init(Object context) {
        wsctx = (ServletEndpointContext)context;
    }
    public void destroy() {
        wsctx = null;
    }
    public int getV() {
        return v;
    }
    public void setV(int v) {
        this.v = v;
    }
    public String getUser() {
        return wsctx.getUserPrincipal().getName();
    }
}
