maguro 2005/04/12 11:27:49
Modified: modules/core/src/java/org/openejb/corba/sunorb
OpenEJBSocketFactory.java SunORBConfigAdapter.java
Log:
Helpful debugging messages
Revision Changes Path
1.4 +4 -3
openejb/modules/core/src/java/org/openejb/corba/sunorb/OpenEJBSocketFactory.java
Index: OpenEJBSocketFactory.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/corba/sunorb/OpenEJBSocketFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- OpenEJBSocketFactory.java 2 Apr 2005 01:08:41 -0000 1.3
+++ OpenEJBSocketFactory.java 12 Apr 2005 15:27:49 -0000 1.4
@@ -85,7 +85,6 @@
*/
public class OpenEJBSocketFactory implements ORBSocketFactory {
- private final Log log = LogFactory.getLog(OpenEJBSocketFactory.class);
public final static String IIOP_SSL = "IIOP_SSL";
public final static String SOCKET_SUPPORTS =
"org.openejb.corba.ssl.SocketProperties.supports";
@@ -253,6 +252,8 @@
// do nothing
}
}
+
+ if (log.isDebugEnabled()) log.debug("Created plain endpoint to " +
primary.getHost() + ":" + primary.getPort());
return new EndPointImpl(ORBSocketFactory.IIOP_CLEAR_TEXT,
primary.getPort(),
1.4 +46 -2
openejb/modules/core/src/java/org/openejb/corba/sunorb/SunORBConfigAdapter.java
Index: SunORBConfigAdapter.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/corba/sunorb/SunORBConfigAdapter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SunORBConfigAdapter.java 2 Apr 2005 01:08:41 -0000 1.3
+++ SunORBConfigAdapter.java 12 Apr 2005 15:27:49 -0000 1.4
@@ -45,9 +45,13 @@
package org.openejb.corba.sunorb;
import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Iterator;
import java.util.List;
import java.util.Properties;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
import org.omg.CSIIOP.EstablishTrustInClient;
import org.omg.Security.Confidentiality;
import org.omg.Security.EstablishTrustInTarget;
@@ -70,6 +74,8 @@
*/
public class SunORBConfigAdapter implements ConfigAdapter {
+ private final Log log = LogFactory.getLog(SunORBConfigAdapter.class);
+
public String[] translateToArgs(TSSConfig config, List args) throws
ConfigException {
ArrayList list = new ArrayList();
@@ -80,6 +86,12 @@
list.add("default-principal::" + principal.getRealmName() + ":"
+ principal.getPrincipal().getClassName() + ":" +
principal.getPrincipal().getPrincipalName());
}
+ if (log.isDebugEnabled()) {
+ for (Iterator iter = list.iterator(); iter.hasNext();) {
+ log.debug(iter.next());
+ }
+ }
+
return (String[]) list.toArray(new String[list.size()]);
}
@@ -99,6 +111,8 @@
reqProp = "Integrity";
props.put("com.sun.CORBA.connection.ORBListenSocket",
"IIOP_SSL:" + Short.toString(sslConfig.getPort()));
+// props.put("org.omg.CORBA.ORBInitialPort", "0");
+ props.put("com.sun.CORBA.ORBServerPort", "0");
if ((supports & NoProtection.value) != 0) {
supProp += ",NoProtection";
@@ -117,6 +131,13 @@
reqProp += ",EstablishTrustInClient";
}
}
+ if ((supports & EstablishTrustInTarget.value) != 0) {
+ supProp += ",EstablishTrustInTarget";
+
+ if ((requires & EstablishTrustInTarget.value) != 0) {
+ reqProp += ",EstablishTrustInTarget";
+ }
+ }
}
}
@@ -129,6 +150,14 @@
props.put("org.omg.PortableInterceptor.ORBInitializerClass.org.openejb.corba.security.SecurityInitializer",
"");
props.put("org.omg.PortableInterceptor.ORBInitializerClass.org.openejb.corba.sunorb.SunORBInitializer",
"");
+ if (log.isDebugEnabled()) {
+ log.debug("translateToProps(TSSConfig)");
+ for (Enumeration iter = props.keys(); iter.hasMoreElements();) {
+ String key = (String) iter.nextElement();
+ log.debug(key + " = " + props.getProperty(key));
+ }
+ }
+
return props;
}
@@ -164,6 +193,13 @@
reqProp += ",Confidentiality";
}
}
+ if ((supports & EstablishTrustInClient.value) != 0) {
+ supProp += ",EstablishTrustInClient";
+
+ if ((requires & EstablishTrustInClient.value) != 0) {
+ reqProp += ",EstablishTrustInClient";
+ }
+ }
if ((supports & EstablishTrustInTarget.value) != 0) {
supProp += ",EstablishTrustInTarget";
@@ -183,6 +219,14 @@
props.put("org.omg.PortableInterceptor.ORBInitializerClass.org.openejb.corba.transaction.TransactionInitializer",
"");
props.put("org.omg.PortableInterceptor.ORBInitializerClass.org.openejb.corba.security.SecurityInitializer",
"");
props.put("org.omg.PortableInterceptor.ORBInitializerClass.org.openejb.corba.sunorb.SunORBInitializer",
"");
+
+ if (log.isDebugEnabled()) {
+ log.debug("translateToProps(CSSConfig)");
+ for (Enumeration iter = props.keys(); iter.hasMoreElements();) {
+ String key = (String) iter.nextElement();
+ log.debug(key + " = " + props.getProperty(key));
+ }
+ }
return props;
}