Re: Jeri/SSL export question
Peter Jones <[email protected]> Wed, 25 Mar 2009 14:24:06 -0400
| Newsgroups | gmane.comp.java.sun.jini |
|---|---|
| Message-ID | <20090325182406.GA7625@east> |
On Wed, Mar 18, 2009 at 07:04:19PM -0600, Esmond Pitt wrote: > Do I have these exporters and ILFactories the right way round? > > Exporter mainExporter = new BasicJeriExporter(ep, new > ProxyTrustILFactory(serverConstraints, null)); > Exporter bootExporter = new BasicJeriExporter(ep, new > BasicILFactory(serverConstraints, null)); > this.exporter = new ProxyTrustExporter(mainExporter, bootExporter); > > It seems to work, and reversing the ILFactories doesn't, but actually I > don't really understand what's going on here. You generally don't use both ProxyTrustILFactory and ProxyTrustExporter together. You can use ProxyTrustILFactory if there is one proxy that can serve both for application remote invocation (either directly or as the inner proxy within a "smart proxy") and as the bootstrap proxy for trust verification (i.e. the proxy that can be trusted by a client's local trust verifiers). You use ProxyTrustExporter, which is a more general mechanism, if you need to use a different proxy for bootstrapping trust verification than you want to use for application-level remote invocations (like if you want to use a custom Endpoint or invocation handler, which wouldn't be locally trusted for bootstrap verification, for the latter). That being said, using ProxyTrustILFactory with mainExporter as above shouldn't cause harm. The problem with reversing them, I suspect, is that ProxyTrustILFactory will complain that the bootstrap remote object internally supplied by ProxyTrustExporter does not implement ServerProxyTrust-- rather, it implements ProxyTrust directly, forwarding getProxyVerifier invocations to ServerProxyTrust.getProxyVerifier of the main remote object. -- Peter -------------------------------------------------------------------------- Getting Started: http://www.jini.org/wiki/Category:Getting_Started Community Web Site: http://jini.org jini-users Archive: http://archives.java.sun.com/archives/jini-users.html Unsubscribing: email "signoff JINI-USERS" to [email protected]