[jboss-cvs] JBossAS SVN: r57571 - in branches/JBoss_4_0_4_GA_JBAS-3755/messaging/src: etc/server/examples/deploy main/org/jboss/mq/il/uil2

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Oct 11 14:57:22 EDT 2006


Author: scott.stark at jboss.org
Date: 2006-10-11 14:57:18 -0400 (Wed, 11 Oct 2006)
New Revision: 57571

Added:
   branches/JBoss_4_0_4_GA_JBAS-3755/messaging/src/etc/server/examples/deploy/sslext-uil2-service.xml
Modified:
   branches/JBoss_4_0_4_GA_JBAS-3755/messaging/src/main/org/jboss/mq/il/uil2/UILServerILService.java
   branches/JBoss_4_0_4_GA_JBAS-3755/messaging/src/main/org/jboss/mq/il/uil2/UILServerILServiceMBean.java
Log:
JBAS-3755, Expose all SSL socket factory settings via properties or attributes for UIL2

Added: branches/JBoss_4_0_4_GA_JBAS-3755/messaging/src/etc/server/examples/deploy/sslext-uil2-service.xml
===================================================================
--- branches/JBoss_4_0_4_GA_JBAS-3755/messaging/src/etc/server/examples/deploy/sslext-uil2-service.xml	2006-10-11 18:50:44 UTC (rev 57570)
+++ branches/JBoss_4_0_4_GA_JBAS-3755/messaging/src/etc/server/examples/deploy/sslext-uil2-service.xml	2006-10-11 18:57:18 UTC (rev 57571)
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Id: ssl-uil2-service.xml 33429 2005-07-11 19:59:46Z adrian $ -->
+
+<server>
+
+  <!-- An example invocation layer using ssl
+       JBossMQ using the Unified Invocation Layer
+       All communication uses one socket connection -->
+
+  <mbean code="org.jboss.mq.il.uil2.UILServerILService"
+	 name="jboss.mq:service=InvocationLayer,type=SSLUIL2">
+
+    <!-- The server chain -->
+    <depends optional-attribute-name="Invoker">jboss.mq:service=Invoker</depends>
+
+    <!-- JNDI binding -->
+    <attribute name="ConnectionFactoryJNDIRef">SSLUIL2ConnectionFactory</attribute>
+
+    <!-- JNDI binding for XA -->
+    <attribute name="XAConnectionFactoryJNDIRef">SSLUIL2XAConnectionFactory</attribute>
+
+    <!-- The bind address -->
+    <attribute name="BindAddress">${jboss.bind.address}</attribute>
+
+    <!-- The bind port -->
+    <attribute name="ServerBindPort">8091</attribute>
+
+    <!-- The ping period in millis -->
+    <attribute name="PingPeriod">60000</attribute>
+
+    <!-- Whether tcp/ip does not wait for buffer fills -->
+
+    <attribute name="EnableTcpNoDelay">true</attribute>
+    <!-- Used to disconnect the client on the serverside if there is no activity -->
+    <!-- Ensure this is greater than the ping period -->
+    <attribute name="ReadTimeout">120000</attribute>
+
+    <!-- Used to disconnect the client on the clientside if there is no activity -->
+    <!-- Ensure this is greater than the ping period -->
+    <attribute name="ClientReadTimeout">300000</attribute>
+
+    <!-- The size of the buffer (in bytes) wrapping the socket -->
+    <!-- The buffer is flushed after each request -->
+    <attribute name="BufferSize">2048</attribute>
+
+    <!-- Large messages may block the ping/pong -->
+    <!-- A pong is simulated after each chunk (in bytes) for both reading and writing -->
+    <!-- It must be larger than the buffer size -->
+    <attribute name="ChunkSize">1000000</attribute>
+    
+    <!-- Minimum number of threads in the internal thread pool -->
+    <attribute name="MinimumThreads">1</attribute>
+    
+    <!-- Maximum number of threads in the internal thread pool -->
+    <!-- This is not strict, it represents how many threads go back into the pool -->
+    <!-- rather than are reaped immediately -->
+    <attribute name="MaximumThreads">50</attribute>
+    
+    <!-- The timeout for unused threads in the internal pool in millis -->
+    <attribute name="TimeoutThreads">60000</attribute>
+
+    <!-- SSL Socket Factories -->
+    <attribute name="ClientSocketFactory">org.jboss.security.ssl.ClientSocketFactory</attribute>
+    <attribute name="ServerSocketFactory">org.jboss.security.ssl.DomainServerSocketFactory</attribute>
+
+    <!-- Security domain - see below -->
+    <attribute name="SecurityDomain">java:/jaas/SSL</attribute>
+  </mbean>
+
+  <!-- Configures the keystore on the security domain
+       This mbean is better placed in conf/jboss-service.xml where it
+       can be used by other services. But it will still work from anywhere.
+       Use keytool from the sdk to create the keystore.
+  -->
+  <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
+         name="jboss.security:service=JaasSecurityDomain,domain=SSL">
+     <!-- This must correlate with the java:/jaas/SSL above -->
+     <constructor>
+        <arg type="java.lang.String" value="SSL"/>
+     </constructor>
+     <!-- The location of the keystore
+          resource: loads from the classloaders conf/ is the first classloader -->
+     <attribute name="KeyStoreURL">resource:test.keystore</attribute>
+     <attribute name="KeyStorePass">changeme</attribute>
+  </mbean>
+
+</server>

Modified: branches/JBoss_4_0_4_GA_JBAS-3755/messaging/src/main/org/jboss/mq/il/uil2/UILServerILService.java
===================================================================
--- branches/JBoss_4_0_4_GA_JBAS-3755/messaging/src/main/org/jboss/mq/il/uil2/UILServerILService.java	2006-10-11 18:50:44 UTC (rev 57570)
+++ branches/JBoss_4_0_4_GA_JBAS-3755/messaging/src/main/org/jboss/mq/il/uil2/UILServerILService.java	2006-10-11 18:57:18 UTC (rev 57571)
@@ -188,7 +188,7 @@
       // Use the default javax.net.ServerSocketFactory if none was set
       if (serverSocketFactory == null)
          serverSocketFactory = ServerSocketFactory.getDefault();
-
+      log.debug("Using serverSocketFactory: "+serverSocketFactory);
       /* See if the server socket supports setSecurityDomain(SecurityDomain)
       if an securityDomain was specified
       */
@@ -481,6 +481,22 @@
       return name;
    }
 
+   /** Set the javax.net.ServerSocketFactory instance to use to
+    * create the service SocketFactory.
+    */
+   public void setServerSocketFactoryBean(ServerSocketFactory factory)
+   {
+      serverSocketFactory = factory;
+   }
+
+   /** Get the javax.net.ServerSocketFactory instance used to
+    * create the service SocketFactory.
+    */
+   public ServerSocketFactory getServerSocketFactoryBean()
+   {
+      return serverSocketFactory;
+   }
+
    /** Set the security domain name to use with SSL aware socket factories
     *@jmx:managed-attribute
     */

Modified: branches/JBoss_4_0_4_GA_JBAS-3755/messaging/src/main/org/jboss/mq/il/uil2/UILServerILServiceMBean.java
===================================================================
--- branches/JBoss_4_0_4_GA_JBAS-3755/messaging/src/main/org/jboss/mq/il/uil2/UILServerILServiceMBean.java	2006-10-11 18:50:44 UTC (rev 57570)
+++ branches/JBoss_4_0_4_GA_JBAS-3755/messaging/src/main/org/jboss/mq/il/uil2/UILServerILServiceMBean.java	2006-10-11 18:57:18 UTC (rev 57571)
@@ -140,6 +140,15 @@
    java.lang.String getServerSocketFactory();
 
    /**
+    * Set the javax.net.ServerSocketFactory instance used to create the service SocketFactory.
+    */
+   void setServerSocketFactoryBean(javax.net.ServerSocketFactory factory);
+   /**
+    * Get the javax.net.ServerSocketFactory instance used to create the service SocketFactory.
+    */
+   javax.net.ServerSocketFactory getServerSocketFactoryBean();
+
+   /**
     * Set the security domain name to use with SSL aware socket factories
     */
    void setSecurityDomain(java.lang.String domainName);




More information about the jboss-cvs-commits mailing list