maguro      2005/03/19 23:52:33

  Modified:    modules/core/src/java/org/openejb/corba/transaction
                        ClientTransactionInterceptor.java
                        ServerTransactionInterceptor.java
  Log:

  Extended the interceptor names to prevent the unlikely event of a name 
collision.  Fixed decoding error.
  
  Revision  Changes    Path
  1.4       +8 -4      
openejb/modules/core/src/java/org/openejb/corba/transaction/ClientTransactionInterceptor.java
  
  Index: ClientTransactionInterceptor.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/corba/transaction/ClientTransactionInterceptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ClientTransactionInterceptor.java 15 Mar 2005 05:27:04 -0000      1.3
  +++ ClientTransactionInterceptor.java 20 Mar 2005 04:52:33 -0000      1.4
  @@ -53,6 +53,8 @@
   import org.omg.PortableInterceptor.ForwardRequest;
   import org.omg.IOP.TaggedComponent;
   import org.omg.IOP.CodecPackage.FormatMismatch;
  +import org.omg.IOP.CodecPackage.TypeMismatch;
  +
   import org.openejb.corba.idl.CosTSInteroperation.TAG_OTS_POLICY;
   import org.openejb.corba.idl.CosTransactions.OTSPolicyValueHelper;
   import org.openejb.corba.idl.CosTransactions.ADAPTS;
  @@ -93,9 +95,11 @@
           byte[] data = taggedComponent.component_data;
           Any any = null;
           try {
  -            any = Util.getCodec().decode(data);
  +            any = Util.getCodec().decode_value(data, 
OTSPolicyValueHelper.type());
           } catch (FormatMismatch formatMismatch) {
               throw (INTERNAL) new INTERNAL("mismatched 
format").initCause(formatMismatch);
  +        } catch (TypeMismatch typeMismatch) {
  +            throw (INTERNAL) new INTERNAL("Type 
mismatch").initCause(typeMismatch);
           }
           short value = OTSPolicyValueHelper.extract(any);
           if (value == ADAPTS.value) {
  @@ -124,6 +128,6 @@
        * @return the name of the interceptor.
        */
       public String name() {
  -        return "ClientTransactionInterceptor";
  +        return "org.openejb.corba.transaction.ClientTransactionInterceptor";
       }
   }
  
  
  
  1.4       +3 -3      
openejb/modules/core/src/java/org/openejb/corba/transaction/ServerTransactionInterceptor.java
  
  Index: ServerTransactionInterceptor.java
  ===================================================================
  RCS file: 
/home/projects/openejb/scm/openejb/modules/core/src/java/org/openejb/corba/transaction/ServerTransactionInterceptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ServerTransactionInterceptor.java 15 Mar 2005 05:27:04 -0000      1.3
  +++ ServerTransactionInterceptor.java 20 Mar 2005 04:52:33 -0000      1.4
  @@ -97,6 +97,6 @@
        * @return the name of the interceptor.
        */
       public String name() {
  -        return "ServerTransactionInterceptor";
  +        return "org.openejb.corba.transaction.ServerTransactionInterceptor";
       }
   }
  
  
  

Reply via email to