Scott, 

Let's give this bruno guy RW, I like guys that posts solutions to the
bugs repository :)

marcf

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]] On 
> Behalf Of [EMAIL PROTECTED]
> Sent: Sunday, July 14, 2002 5:14 AM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-dev] [ jboss-Bugs-575967 ] JRMPInvoker / 
> RMISSLServerSocketFactory
> 
> 
> Bugs item #575967, was opened at 2002-07-01 07:00
> You can respond by visiting: 
> https://sourceforge.net/tracker/?func=detail&atid=376685&aid=5
> 75967&group_id=22866
> 
> Category: JBossServer
> >Group: v3.0 Rabbit Hole
> >Status: Closed
> >Resolution: Fixed
> Priority: 5
> Submitted By: Bruno Lowagie (blowagie)
> >Assigned to: Scott M Stark (starksm)
> Summary: JRMPInvoker / RMISSLServerSocketFactory
> 
> Initial Comment:
> JRMPInvoker has a method private void
> loadCustomSocketFactories()
> 
> If you defined a custom serverSocketFactory, an
> instance of this factory is made
> and the BindAddress is set:
>          if( serverSocketFactoryName != null )
>          {
>             Class ssfClass = 
> loader.loadClass(serverSocketFactoryName);
>             serverSocketFactory =
> (RMIServerSocketFactory) ssfClass.newInstance();
>             if( serverAddress != null )
>             {
>                // See if the server socket supports
> setBindAddress(String)
>                try
>                {
>                   Class[] parameterTypes = {String.class};
>                   Method m = 
> ssfClass.getMethod("setBindAddress", parameterTypes);
>                   Object[] args = {serverAddress};
>                   m.invoke(serverSocketFactory, args);
>                }
>                catch (NoSuchMethodException e)
>                {
>                   log.warn("Socket factory does not
> support setBindAddress(String)");
>                   // Go with default address
>                }
>                catch (Exception e)
>                {
>                   log.warn("Failed to 
> setBindAddress="+serverAddress+" on socket factory", e);
>                   // Go with default address
>                }
>             }
>          }
> 
> So far, so good.
> But if you use
> org.jboss.security.ssl.RMISSLServerSocketFactory
> you also have to invoke the setSecurityDomain-method.
> 
> Otherwise the RMISSLServerSocketFactory is constructed
> WITHOUT
> a securityDomain. As a result, a
> DomainServerSocketFactory is constructed:
> domainFactory = new DomainServerSocketFactory();
> 
> Instead of using for instance:
> domainFactory = DomainServerSocketFactory.getDefault();
> 
> So the securityDomain always remains null and you get a 
> NullPointerException upon startup of jBoss.
> 
> In other words: it is impossible to use the provided
> classes to have
> RMI working over SSL.
> 
> A quick patch would be to use
> DomainServerSocketFactory.getDefault()
> in class RMISSLServerSocketFactory.
> A more elegant solution would be to check for a
> SecurityDomain in the
> JRMPInvoker class and to set this variable. This way
> people could chose
> there own domain instead of using java:/jaas/other.
> 
> I hope I have given you enough info to solve this bug,
> Bruno
> 
> ----------------------------------------------------------------------
> 
> >Comment By: Scott M Stark (starksm)
> Date: 2002-07-14 02:14
> 
> Message:
> Logged In: YES 
> user_id=175228
> 
> The JRMPInvoker now supports a SecurityDomain attribute 
> for setting the socket factory value.
> 
> ----------------------------------------------------------------------
> 
> You can respond by visiting: 
> https://sourceforge.net/tracker/?func=detail&atid=376685&aid=5
75967&group_id=22866


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf _______________________________________________
Jboss-development mailing list [EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to