0 Replies Latest reply: Sep 24, 2010 2:43 AM by Hasnain Alibhai RSS

    JBoss Serialization slower

    Hasnain Alibhai Newbie



      I am currently measuring JBoss Serialization and everytime i run it against a bench mark it gives me 50% slower result. I might be doing something wrong here (so help would be really appreciated).




      JDK 1.6


      * Converts an object to a serialized byte array.
      * @param obj Object to be converted.
      * @return byte[] Serialized array representing the object.
      public static byte[] getByteArrayFromObjectJBoss(Object obj) {
         byte[] result = null;
         try {
             ByteArrayOutputStream baos = new ByteArrayOutputStream();
             ObjectOutputStream oos = new JBossObjectOutputStream(baos);
             result = baos.toByteArray();
         } catch (IOException ioEx) {
             Logger.getLogger("UtilityMethods").error("Error converting object to byteArray", ioEx);
         return result;

      I am also attaching files that I have made.


      Thanks in advance,