[
http://jira.jboss.com/jira/browse/JBREM-564?page=all ]
Tom Elrod resolved JBREM-564.
------------------------------
Resolution: Done
System property is org.jboss.remoting.defaultSocketFactory. Have added to docs how to use
this (which is basically to set the system property to fully qualified class name for
implementation to use as default socket factory.
Default client socket factory configured by a system property
-------------------------------------------------------------
Key: JBREM-564
URL:
http://jira.jboss.com/jira/browse/JBREM-564
Project: JBoss Remoting
Issue Type: Feature Request
Security Level: Public(Everyone can see)
Components: security
Affects Versions: 2.0.0.CR1 (Boon)
Reporter: Roland R?z
Assigned To: Tom Elrod
Fix For: 2.0.0.GA (Boon)
To activate an ssl socket factory for the jobs remoting on the in a JBoss standalone
client, the default socket factory of a VM can be configured by a java.security
configuration activated with the java.security.properties=.../java.security System
Property.
Providing always such a configuration file is complicated. A simpler solution is a system
property providing the name of the socket factory class:
Here a possible implementation:
Class org.jboss.remoting.security.SSLSocketBuilder:
public SocketFactory createSSLSocketFactory() throws IOException,
NoSuchAlgorithmException, KeyStoreException, CertificateException,
KeyManagementException {
SocketFactory sf = null;
if (useSSLSocketFactory) {
String defaultFactoryName = System
.getProperty("jboss.remoting.defaultSocketFactory");
if (defaultFactoryName != null) {
try {
Class sfClass = Thread.currentThread()
.getContextClassLoader().loadClass(
defaultFactoryName);
Method m = sfClass.getMethod("getDefault", null);
if (m == null) {
throw new RuntimeException(
"Could not create the socket factory "
+ defaultFactoryName
+ " because the class "
+ sfClass
+ " doesn't provide the getDefault method.");
}
sf = (SocketFactory) m.invoke(null, null);
} catch (Exception ex) {
throw new RuntimeException(
"Could not create the socket factory "
+ defaultFactoryName, ex);
}
}
if (sf == null) {
sf = SSLSocketFactory.getDefault();
}
} else {
sf = createCustomSocketFactory();
}
return sf;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira