[jboss-user] [Remoting] - Remoting2 - MC bean for SSL Connector

jaikiran do-not-reply at jboss.com
Fri Jan 30 08:08:21 EST 2009


Could someone please point me to some document where i can find a MC bean configuration for setting up a SSL connector equivalent to this MBean configuration:

<?xml version="1.0" encoding="UTF-8"?>
  | 
  | <server>
  |    <!-- The server socket factory mbean to be used as attribute to socket invoker -->
  |    <!-- which uses the JaasSecurityDomain -->
  |    <mbean code="org.jboss.remoting.security.domain.DomainServerSocketFactoryService"
  |       name="jboss.remoting:service=ServerSocketFactory,type=SecurityDomainAdvanced"
  |       display-name="SecurityDomain Server Socket Factory">
  |        <attribute name="SecurityDomain">java:/jaas/SSLAdvanced</attribute>
  |       <depends>jboss.security:service=JaasSecurityDomain,domain=SSLAdvanced</depends>
  |    </mbean>
  |    
  |      <mbean code="org.jboss.security.plugins.JaasSecurityDomain"
  |          name="jboss.security:service=JaasSecurityDomain,domain=SSLAdvanced">
  |      <!-- This must correlate with the java:/jaas/SSL above -->
  |      <constructor>
  |         <arg type="java.lang.String" value="SSLAdvanced"/>
  |      </constructor>
  |      <!-- The location of the keystore
  |           resource: loads from the classloaders conf/ is the first classloader -->
  |      <attribute name="KeyStoreURL">localhost.keystore</attribute>
  |      <attribute name="KeyStorePass">opensource</attribute>
  |   </mbean>
  | 
  |    <!-- The Connector is the core component of the remoting server service. -->
  |    <!-- It binds the remoting invoker (transport protocol, callback configuration, -->
  |    <!-- data marshalling, etc.) with the invocation handlers.  -->
  |    <mbean code="org.jboss.remoting.transport.Connector"
  |           
  |           name="jboss.remoting:type=Connector,transport=socket3843,handler=ejb3">
  |           display-name="Socket transport Connector">
  | 
  |       <attribute name="Configuration">
  |          <config>
  |              <invoker transport="sslsocket">
  |                <attribute name="dataType" isParam="true">invocation</attribute>
  |                <attribute name="marshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationMarshaller</attribute>
  |                <attribute name="unmarshaller" isParam="true">org.jboss.invocation.unified.marshall.InvocationUnMarshaller</attribute>
  |                <!-- The following is for setting the server socket factory.  If want ssl support -->
  |                <!-- use a server socket factory that supports ssl.  The only requirement is that -->
  |                <!-- the server socket factory value must be an ObjectName, meaning the -->
  |                <!-- server socket factory implementation must be a MBean and also -->
  |                <!-- MUST implement the org.jboss.remoting.security.ServerSocketFactoryMBean interface. -->
  |                <attribute name="serverSocketFactory">jboss.remoting:service=ServerSocketFactory,type=SecurityDomainAdvanced</attribute>
  |                <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
  |                <attribute name="serverBindPort">3843</attribute>
  |             </invoker>
  |             <handlers>
  |             <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
  |             </handlers>
  |          </config>
  |       </attribute>
  |       <depends>jboss.remoting:service=ServerSocketFactory,type=SecurityDomainAdvanced</depends>
  | 
  |    </mbean>
  | 
  | </server>
  | 

Note that this works fine, but since most of the configurations AS5 have now moved to MC Bean, i was hoping to do the same for this configuration (which is being used in one of EJB3 examples).

I guess, its mainly on the lines of this:

<bean name="org.jboss.ejb3.RemotingConnector"
  |     class="org.jboss.remoting.transport.Connector">
  | 
  |     <property name="invokerLocator">
  | 
  |       <value-factory bean="ServiceBindingManager"
  |         method="getStringBinding">
  |         <parameter>
  |           jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3
  |         </parameter>
  |         <parameter>
  |           <null />
  |         </parameter>
  |         <parameter>socket://${jboss.bind.address}:${port}</parameter>
  |         <parameter>
  |           <null />
  |         </parameter>
  |         <parameter>3873</parameter>
  |       </value-factory>
  | 
  |     </property>
  |     <property name="serverConfiguration">
  |       <inject bean="ServerConfiguration" />
  |     </property>
  |   </bean>
  | 
  |   <!-- Remoting Server Configuration -->
  |   <bean name="ServerConfiguration"
  |     class="org.jboss.remoting.ServerConfiguration">
  |     <property name="invocationHandlers">
  |       <map keyClass="java.lang.String" valueClass="java.lang.String">
  |         <entry>
  |           <key>AOP</key>
  |           <value>
  |             org.jboss.aspects.remoting.AOPRemotingInvocationHandler
  |           </value>
  |         </entry>
  |       </map>
  |     </property>
  |   </bean> 

But the missing part is, the passing of keystore url and password to the bean. I looked at the org.jboss.remoting.ServerConfiguration which says this:

anonymous wrote : For an example of the use of ServerConfiguration with the microcontainer, see the org.jboss.test.remoting.configuration package in the testsuite directory of the JBoss Application Server 5.0.0.

But i don't see any test cases with that package in the AS5 testsuite. Maybe they have moved?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4205885#4205885

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4205885



More information about the jboss-user mailing list