-
15. Re: Remote access of EJB over SSL
gottalotta Jan 15, 2014 12:52 PM (in response to wdfink)Thanks again Wolf-Dieter for your suggestion, I'll do it first thing tomorrow! Just wanted to correct my previous post, the header is in plain text, the rest of the communication is encrypted... this is between server and client collocated on the same host. I'll give it a go tomorrow with ejb-client approach as you suggested!
-
18. Re: Remote access of EJB over SSL
gottalotta Jan 16, 2014 7:47 AM (in response to rohanemmanuel)Dear Wolf-Dieter, Thorben and Xiang,
Finally got the remote connection working where the client and server are on different hosts for the tutorial http://middlewaremagic.com/jboss/?p=2176, however still don't get why it was working when client and server are on the same host?!? My EJB lookup is working, thanks to Xiang posted tutorial links and ejb-client lookup approach suggested by Wolf and Thorben
Properties p = new Properties();
p.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "true");
p.put("remote.connections", "default");
p.put("remote.connection.default.host", "remote_ip");
p.put("remote.connection.default.port", "4447");
p.put("remote.connection.default.username", "ejbUser");
p.put("remote.connection.default.password", "ejbPassword");
p.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS", "false");
p.put("remote.connection.default.connect.options.org.xnio.Options.SASL_DISALLOWED_MECHANISMS", "JBOSS-LOCAL-USER");
p.put("remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOPLAINTEXT", "false");
p.put("remote.connection.default.connect.options.org.xnio.Options.SSL_STARTTLS", "true");
p.put("remote.connection.default.connect.timeout", "30000");
EJBClientConfiguration cc = new PropertiesBasedEJBClientConfiguration(p);
ContextSelector<EJBClientContext> selector = new ConfigBasedEJBClientContextSelector(cc);
EJBClientContext.setSelector(selector);
Properties props = new Properties();
props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
context = new InitialContext(props);
CallerRemote securedRemoteSession = (CallerRemote) context.lookup("ejb:/remoteEJB//CallerBean!remote.CallerRemote");
Thanks guys you're the best!
-
19. Re: Remote access of EJB over SSL
wdfink Jan 16, 2014 5:04 PM (in response to gottalotta)Great that you get that working, to help others you should mark the helpful answers and set the thread to answered
-
20. Re: Remote access of EJB over SSL
ybxiang.china Jan 16, 2014 9:43 PM (in response to rohanemmanuel)My pleasure!
you are welcome!
-
21. Re: Remote access of EJB over SSL
jjakub Mar 7, 2014 10:23 AM (in response to gottalotta)Rihards, have You read?: