Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JBoss and certificates

 
glenn spjuver
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I'm having a problem connecting to another server from my JBoss (3.2.3) server. It works fine when I connect from a standalone class, but when I try to do it from JBoss it seems like the certificate can't be found. It's not really the connection that doesn't work, but that the certificate is not used when connecting from within JBoss. I get no error messages from JBoss regarding the certificate, even if I set the logging level to trace. The errormessage I get is from the remote web-service I'm using, and it says that I need a valid certificate...

This is the java code I use to set up the connection in JBoss, it's the same code I successfully run as a standalone client.

System.setProperty("sun.rmi.transport.connectionTimeout", "20000");
System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
System.setProperty("javax.net.ssl.keyStore", "C:/jboss-3.2.3/server/default/conf/myKeystore.pfx");
System.setProperty("javax.net.ssl.keyStoreType", "pkcs12");
System.setProperty("javax.net.ssl.keyStorePassword", "myPassword");

Why can't I get it to work, do I need to config some jboss xml-files or something?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic