[jboss-cvs] JBossAS SVN: r63232 - in trunk/iiop/src/main/org/jboss: tm/iiop/client and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon May 28 22:41:49 EDT 2007
Author: reverbel
Date: 2007-05-28 22:41:49 -0400 (Mon, 28 May 2007)
New Revision: 63232
Modified:
trunk/iiop/src/main/org/jboss/iiop/jacorb/SSLServerSocketFactory.java
trunk/iiop/src/main/org/jboss/iiop/jacorb/SSLSocketFactory.java
trunk/iiop/src/main/org/jboss/tm/iiop/client/IIOPClientUserTransactionObjectFactory.java
Log:
Modifications needed by JacORB 2.3.0jboss.patch1 (JBAS-4146).
The changes in SSLSocketFactory/SSLServerSocketFactory and DomainSocketFactory reflect changes in JacORB's socket factory APIs in JacORB 2.3.0.
The change in IIOPClientUserTransactionObjectFactory is due to the stricter type-checking done by the method narrow in JacORB 2.3.0.
Modified: trunk/iiop/src/main/org/jboss/iiop/jacorb/SSLServerSocketFactory.java
===================================================================
--- trunk/iiop/src/main/org/jboss/iiop/jacorb/SSLServerSocketFactory.java 2007-05-29 02:40:12 UTC (rev 63231)
+++ trunk/iiop/src/main/org/jboss/iiop/jacorb/SSLServerSocketFactory.java 2007-05-29 02:41:49 UTC (rev 63232)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.iiop.jacorb;
import java.io.IOException;
@@ -34,7 +34,7 @@
/**
* This implementation of the JacORB-specific interface
- * <code>org.jacorb.orb.factory.SSLServerSocketFactory</code> uses the JSSE
+ * <code>org.jacorb.orb.factory.ServerSocketFactory</code> uses the JSSE
* KeyManagerFactory and TrustManagerFactory objects encapsulated by
* a JBossSX SecurityDomain. It looks up the
* <code>org.jboss.security.SecurityDomain</code> instance bound to the
@@ -44,7 +44,7 @@
* @version $Revision$
*/
public class SSLServerSocketFactory
- implements org.jacorb.orb.factory.SSLServerSocketFactory,
+ implements org.jacorb.orb.factory.ServerSocketFactory,
org.apache.avalon.framework.configuration.Configurable
{
// Static --------------------------------------------------------
@@ -108,8 +108,8 @@
log.info("Created");
}
- // JacORB SSLServerSocketFactory implementation ------------------
- // (interface org.jacorb.orb.factory.SSLServerSocketFactory)
+ // JacORB ServerSocketFactory implementation ------------------
+ // (interface org.jacorb.orb.factory.ServerSocketFactory)
public ServerSocket createServerSocket(int port)
throws IOException
@@ -156,11 +156,6 @@
return s;
}
- public boolean isSSL(java.net.ServerSocket s)
- {
- return (s instanceof SSLServerSocket);
- }
-
public void switchToClientMode(java.net.Socket socket)
{
// no-op
Modified: trunk/iiop/src/main/org/jboss/iiop/jacorb/SSLSocketFactory.java
===================================================================
--- trunk/iiop/src/main/org/jboss/iiop/jacorb/SSLSocketFactory.java 2007-05-29 02:40:12 UTC (rev 63231)
+++ trunk/iiop/src/main/org/jboss/iiop/jacorb/SSLSocketFactory.java 2007-05-29 02:41:49 UTC (rev 63232)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.iiop.jacorb;
import java.io.IOException;
@@ -54,7 +54,6 @@
// Attributes ----------------------------------------------------
private DomainSocketFactory domainFactory = null;
- private String[] cipher_suites = null;
// Constructor ---------------------------------------------------
@@ -81,12 +80,35 @@
// JacORB SSLSocketFactory implementation ------------------------
// (interface org.jacorb.orb.factory.SSLSocketFactory)
+ /**
+ * create a connected stream Socket.
+ *
+ * @param host the host name
+ * @param port the port number
+ * @return a connected stream Socket
+ * @throws IOException, UnknownHostException
+ */
public Socket createSocket(String host, int port)
throws IOException, UnknownHostException
{
return domainFactory.createSocket(host, port);
}
+ /**
+ * create a connected stream Socket.
+ *
+ * @param host the host name
+ * @param port the port number
+ * @param timeout the timeout value to be used in milliseconds
+ * @return a connected stream Socket
+ * @throws IOException
+ */
+ public Socket createSocket(String host, int port, int timeout)
+ throws IOException, UnknownHostException
+ {
+ return domainFactory.createSocket(host, port, timeout);
+ }
+
public boolean isSSL (java.net.Socket s)
{
return (s instanceof SSLSocket);
Modified: trunk/iiop/src/main/org/jboss/tm/iiop/client/IIOPClientUserTransactionObjectFactory.java
===================================================================
--- trunk/iiop/src/main/org/jboss/tm/iiop/client/IIOPClientUserTransactionObjectFactory.java 2007-05-29 02:40:12 UTC (rev 63231)
+++ trunk/iiop/src/main/org/jboss/tm/iiop/client/IIOPClientUserTransactionObjectFactory.java 2007-05-29 02:41:49 UTC (rev 63232)
@@ -1,24 +1,24 @@
/*
-* JBoss, Home of Professional Open Source
-* Copyright 2005, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.jboss.tm.iiop.client;
import java.util.Hashtable;
@@ -94,9 +94,11 @@
if (!name.toString().equals("UserTransaction"))
return null;
+ if (!(obj instanceof org.omg.CORBA.Object))
+ return null;
try
{
- TransactionFactoryExtHelper.narrow(obj);
+ TransactionFactoryExtHelper.narrow((org.omg.CORBA.Object)obj);
}
catch (BAD_PARAM e)
{
More information about the jboss-cvs-commits
mailing list