Difference between revisions of "How to connect Rifidi via RMI Client"

From RifidiWiki

Jump to: navigation, search
(New page: *1) Ensure you set client java property to ensure ssl Cipher matches javax.rmi.ssl.client.enabledCipherSuites=SSL_DH_anon_WITH_RC4_128_MD5 *2) Sample RMI Client code // SecurityCon...)
(No difference)

Revision as of 11:10, 1 June 2014

  • 1) Ensure you set client java property to ensure ssl Cipher matches

javax.rmi.ssl.client.enabledCipherSuites=SSL_DH_anon_WITH_RC4_128_MD5

  • 2) Sample RMI Client code

// SecurityContextHolder.getContext().setAuthentication(auth);

     RmiProxyFactoryBean proxy = new RmiProxyFactoryBean();
     proxy.setCacheStub(true);
     proxy.setRefreshStubOnConnectFailure(true);
     proxy.setServiceInterface(SensorManagerService.class);
     proxy.setServiceUrl("rmi://[replace with ipaddress such as 127.0.0.1]:1101/SensorManagerService");
     proxy.setRemoteInvocationFactory(new ContextPropagatingRemoteInvocationFactory());
     proxy.afterPropertiesSet();
     SensorManagerService service = (SensorManagerService) proxy.getObject();
     ReaderDTO reader = service.getReader("LLRP_1");
  }
Personal tools