User: mnf999  
  Date: 02/03/07 10:59:53

  Modified:    src/main/org/jboss/invocation MarshalledInvocation.java
  Log:
  
  
  Revision  Changes    Path
  1.7       +25 -24    jboss/src/main/org/jboss/invocation/MarshalledInvocation.java
  
  Index: MarshalledInvocation.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jboss/src/main/org/jboss/invocation/MarshalledInvocation.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- MarshalledInvocation.java 7 Mar 2002 18:32:26 -0000       1.6
  +++ MarshalledInvocation.java 7 Mar 2002 18:59:52 -0000       1.7
  @@ -34,7 +34,7 @@
   *
   *   @see <related>
   *   @author  <a href="mailto:[EMAIL PROTECTED]";>Marc Fleury</a>
  -*   @version $Revision: 1.6 $
  +*   @version $Revision: 1.7 $
   *   Revisions:
   *
   *   <p><b>Revisions:</b>
  @@ -53,14 +53,14 @@
   *   </ul>
   */
   public class MarshalledInvocation
  -   extends Invocation
  -   implements java.io.Externalizable
  +extends Invocation
  +implements java.io.Externalizable
   {
      // Constants -----------------------------------------------------
      
      /** Serial Version Identifier. */
      static final long serialVersionUID = -718723094688127810L;
  -
  +   
      // The Transaction Propagation Context for distribution
      Object tpc;
      
  @@ -69,7 +69,7 @@
      
      // Static --------------------------------------------------------
      static Map hashMap = new WeakHashMap();
  -
  +   
      /**
      * Calculate method hashes. This algo is taken from RMI.
      *
  @@ -107,7 +107,7 @@
                  map.put(method, new Long(hash));
               else 
                  map.put(new Long(hash), method);
  -               
  +         
            }
            catch (Exception e)
            {
  @@ -117,7 +117,7 @@
         
         return map;
      }
  -
  +   
      static String getTypeString(Class cl)
      {
         if (cl == Byte.TYPE)
  @@ -155,7 +155,7 @@
            return "L"+cl.getName().replace('.','/')+";";
         }
      }
  -
  +   
      /*
      * The use of hashCode is not enough to differenciate methods
      * we override the hashCode
  @@ -191,6 +191,7 @@
      {
         super(invocation.payload);
         this.as_is_payload = invocation.as_is_payload;
  +   }
      
      public MarshalledInvocation(Map payload) 
      {   
  @@ -211,7 +212,7 @@
         Principal identity, 
         Object credential)
      {
  -       super(id, m, args, tx, identity, credential);
  +      super(id, m, args, tx, identity, credential);
      }
      // Public --------------------------------------------------------
      
  @@ -247,7 +248,7 @@
      {
         methodMap = methods;
      }
  -
  +   
      // The transaction propagation context for the Invocation that travels 
(distributed tx only)
      public void setTransactionPropagationContext(Object tpc)
      {
  @@ -257,17 +258,17 @@
      {
         return tpc;
      }
  -
  +   
      // Invocation overwrite -----------------------------------------
  -
  +   
      /** A Marshalled invocation has serialized data in the form of
  -    MarshalledValue objects. We overwrite the "getValue" to deserialize the
  -    data, this assume that the thread context class loader has visibility
  -    on the classes.
  -    */
  +   MarshalledValue objects. We overwrite the "getValue" to deserialize the
  +   data, this assume that the thread context class loader has visibility
  +   on the classes.
  +   */
      public Object getValue(Object key) 
      { 
  -
  +      
         Object value = super.getValue(key);
         
         // The map may contain serialized values of the fields
  @@ -287,10 +288,10 @@
         }
         return value;
      }
  -
  +   
      // Externalizable implementation ---------------------------------
      public void writeExternal(java.io.ObjectOutput out)
  -      throws IOException
  +   throws IOException
      {
         
         // FIXME marcf: the "specific" treatment of Transactions should be abstracted.
  @@ -303,19 +304,19 @@
         server but not in the generic JMX land. they will travel in the  payload
         as MarshalledValue objects, see the Invocation getter logic
         */
  -
  +      
         Iterator keys = payload.keySet().iterator();
         while (keys.hasNext())
         {
            Object currentKey = keys.next();
  -   
  +         
            // This code could be if (object.getClass().getName().startsWith("java")) 
then don't serialize. 
            // Bench the above for speed.
            
            //Replace the current object with a Marshalled representation
            if (currentKey == METHOD)
               // We write the hash instead of the method
  -            sentData.put(METHOD, new Long(calculateHash((Method) 
payload.get(METHOD))));
  +         sentData.put(METHOD, new Long(calculateHash((Method) 
payload.get(METHOD))));
            else
               sentData.put (currentKey, new MarshalledValue(payload.get(currentKey)));
         }
  @@ -326,9 +327,9 @@
         // This map is "safe" as is
         out.writeObject(as_is_payload);
      }
  -
  +   
      public void readExternal(java.io.ObjectInput in)
  -      throws IOException, ClassNotFoundException
  +   throws IOException, ClassNotFoundException
      {
         // Read TPC
         tpc = in.readObject();
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to