s" value="[CA certificate locations]"/> 您可以按照一般网格服务的方式,根据 GWSDL 和 WSDL 生成服务的存根。在清单 4 中,我们展示了如何从服务的上下文中获取调用者的身份标识。清单中还阐明了其他一些可能的配置,服务端可能要求用这些配置设置安全通知回调。 清单 4. HelloWorldImpl.java 服务的实现 public class HelloWorldImpl extends GridServiceImpl implements HelloWorldPortType, CredentialRefreshListener { public helloWorldImpl() { super("HelloWorld"); } public String sayHello(String in0) throws java.rmi.RemoteException { String identity = SecurityManager.getManager().getCaller(); System.out.println("The identity is "+identity); Subject subject = JaasSubject.getCurrentSubject(); System.out.println("Jaas Subject is "+ subject);
数据载入中...
页码:[1] [2] [3] [4] [5] [6] [7] 第7页、共7页 |