Package org.jboss.invocation

Examples of org.jboss.invocation.MarshalledValue


             // don't set it to null - simply use an empty hash map.
             node = new HashMap(0);
         }
//         else
//         {
        Object marshalledNode = new MarshalledValue(node);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        oos.writeObject(marshalledNode);

        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
View Full Code Here


      }
   }

   public void marshalledPut_(Fqn fqn, Object key, Object value) throws CacheException
   {
      MarshalledValue mv = null;
      try {
         mv = new MarshalledValue(value);
      } catch (IOException e) {
         e.printStackTrace();
         throw new CacheException("marshalledPut() exception: " +e);
      }
View Full Code Here

         else
         // get it from cache store
            value = get(fqn, key);
            if(value == null) return null;
            checkValue(value);
            MarshalledValue mv = (MarshalledValue)value;
            value = mv.get();
            // populate the local copy
            localCopy_.put(fqn, key, value);
            return value;
         }
      } catch (IOException e) {
View Full Code Here

      // Check the headers for gzip Content-Encoding
      String encoding = conn.getHeaderField("Content-Encoding");
      if( encoding != null && encoding.indexOf("gzip") >= 0 )
         is = new GZIPInputStream(is);
      ObjectInputStream ois = new ObjectInputStream(is);
      MarshalledValue mv = (MarshalledValue) ois.readObject();
      // A hack for jsse connection pooling (see patch ).
      ois.read();
      ois.close();
      oos.close();

      // If the encoded value is an exception throw it
      Object value = mv.get();
      if( value instanceof Exception )
      {
         throw (Exception) value;
      }
View Full Code Here

            // This code could be if (object.getClass().getName().startsWith("java")) then don't serialize.
            // Bench the above for speed.

            out.writeObject(currentKey);
            out.writeObject(new MarshalledValue(payload.get(currentKey)));
         }
      }

      // This map is "safe" as is
      //out.writeObject(as_is_payload);
View Full Code Here

         ps.setString(1, name.toString());

         if(node != null)
         {
            Object marshalledNode = new MarshalledValue(node);
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            ObjectOutputStream oos = new ObjectOutputStream(baos);
            oos.writeObject(marshalledNode);

            ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
View Full Code Here

             // don't set it to null - simply use an empty hash map.
             node = new HashMap(0);
         }
//         else
//         {
        Object marshalledNode = new MarshalledValue(node);
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream(baos);
        oos.writeObject(marshalledNode);

        ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
View Full Code Here

      if( log.isTraceEnabled() )
         log.trace("ContentLength: "+length+"\nContentType: "+type);

      InputStream is = conn.getInputStream();
      ObjectInputStream ois = new ObjectInputStream(is);
      MarshalledValue mv = (MarshalledValue) ois.readObject();
      ois.close();

      Object obj = mv.get();
      if( (obj instanceof Naming) == false )
      {
         String msg = "Invalid reply content seen: "+obj.getClass();
         Throwable t = null;
         if( obj instanceof Throwable )
View Full Code Here

         {
            value = ((EJBObject)value).getHandle();
         }

         // Marshall the object using MashalledValue to handle classloaders
         value = new MarshalledValue(value);

         // return the serialize the value
         baos = new ByteArrayOutputStream();
         oos = new ObjectOutputStream(baos);
         oos.writeObject(value);
View Full Code Here

/*     */
/* 180 */     String encoding = conn.getHeaderField("Content-Encoding");
/* 181 */     if ((encoding != null) && (encoding.indexOf("gzip") >= 0))
/* 182 */       is = new GZIPInputStream(is);
/* 183 */     ObjectInputStream ois = new ObjectInputStream(is);
/* 184 */     MarshalledValue mv = (MarshalledValue)ois.readObject();
/*     */
/* 186 */     ois.read();
/* 187 */     ois.close();
/* 188 */     oos.close();
/*     */
/* 191 */     Object value = mv.get();
/* 192 */     if ((value instanceof Exception))
/*     */     {
/* 194 */       throw ((Exception)value);
/*     */     }
/*     */
View Full Code Here

TOP

Related Classes of org.jboss.invocation.MarshalledValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.