[jboss-cvs] JBossAS SVN: r65166 - in branches/Branch_4_2/iiop/src/main/org/jboss/proxy: ejb and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Sep 6 11:38:54 EDT 2007
Author: adrian at jboss.org
Date: 2007-09-06 11:38:54 -0400 (Thu, 06 Sep 2007)
New Revision: 65166
Modified:
branches/Branch_4_2/iiop/src/main/org/jboss/proxy/compiler/IIOPStubCompiler.java
branches/Branch_4_2/iiop/src/main/org/jboss/proxy/ejb/DynamicIIOPStub.java
Log:
JBAS-4681 Fix the toString when the Corba stub is not connected to the orb
Modified: branches/Branch_4_2/iiop/src/main/org/jboss/proxy/compiler/IIOPStubCompiler.java
===================================================================
--- branches/Branch_4_2/iiop/src/main/org/jboss/proxy/compiler/IIOPStubCompiler.java 2007-09-06 15:38:33 UTC (rev 65165)
+++ branches/Branch_4_2/iiop/src/main/org/jboss/proxy/compiler/IIOPStubCompiler.java 2007-09-06 15:38:54 UTC (rev 65166)
@@ -311,28 +311,6 @@
asm.ret();
}
- // Generate the toString() method
- asm.addMember(Modifier.PUBLIC, String.class, "toString", noParams, null);
- {
- {
- asm.pushConstant("JBossDynStub["
- + interfaceAnalysis.getCls().getName() + ", ");
- {
- {
- asm.pushLocal(0);
- asm.invoke(superclass, "_orb", noParams);
- }
- asm.pushLocal(0);
- asm.invoke(org.omg.CORBA.ORB.class,
- "object_to_string", corbaObjectParam);
- }
- asm.invoke(String.class, "concat", stringParam);
- }
- asm.pushConstant("]");
- asm.invoke(String.class, "concat", stringParam);
- asm.ret();
- }
-
// Generate the method _ids(), declared as abstract in ObjectImpl
String[] ids = interfaceAnalysis.getAllTypeIds();
asm.addMember(Modifier.PRIVATE + Modifier.STATIC, String[].class,
Modified: branches/Branch_4_2/iiop/src/main/org/jboss/proxy/ejb/DynamicIIOPStub.java
===================================================================
--- branches/Branch_4_2/iiop/src/main/org/jboss/proxy/ejb/DynamicIIOPStub.java 2007-09-06 15:38:33 UTC (rev 65165)
+++ branches/Branch_4_2/iiop/src/main/org/jboss/proxy/ejb/DynamicIIOPStub.java 2007-09-06 15:38:54 UTC (rev 65166)
@@ -25,6 +25,7 @@
import org.jboss.iiop.rmi.marshal.strategy.StubStrategy;
import org.jboss.logging.Logger;
+import org.omg.CORBA.BAD_OPERATION;
import org.omg.CORBA.SystemException;
import org.omg.CORBA.portable.ApplicationException;
import org.omg.CORBA.portable.RemarshalException;
@@ -277,4 +278,20 @@
stubStrategy, params)).doubleValue();
}
+ @Override
+ public String toString()
+ {
+ StringBuilder builder = new StringBuilder();
+ builder.append("JBossDynStub[").append(getClass().getName()).append(", ");
+ try
+ {
+ builder.append(_orb().object_to_string(this));
+ }
+ catch (BAD_OPERATION ignored)
+ {
+ builder.append("*DISCONNECTED*");
+ }
+ builder.append("]");
+ return builder.toString();
+ }
}
More information about the jboss-cvs-commits
mailing list