0 Replies Latest reply on Aug 11, 2017 5:52 AM by stevehayesxx

    WildFly 10 - Migrating from file persisted EJB Timers to database persisted ones.

    stevehayesxx

      We want to migrate file persisted EJB timers to database persisted ones.

       

      Has anyone had any experience with this ?

       

      I was going to read in the XML files and then re-persist them.

      This approach is fine until I try to decode the Base64 encoded string contained in the info tag.

       

      The Base64 decoding works fine, however the resulting bytes don't seem to conform to the standard for a serialized object.

      I assumed that what was contained in the info tag was just a Base64 encoded String generated from the bytes created by serializing the payload.

       

      Any info / ideas on this would be welcome. The following is the code I'm using (pretty much standard for deserializing).

      It results in an invalid header exception.

       

      byte[] base64decodedBytes = Base64.getDecoder().decode( "TheStringContainedInTheInfoTag" );

       

      try ( ObjectInputStream ois = new ObjectInputStream( new ByteArrayInputStream( base64decodedBytes ) ) ) {

          ScheduledArchiveJobTimerPayload payload = (ScheduledArchiveJobTimerPayload)ois.readObject();

      }

       

       

      Thanks

       

      Steve