0 Replies Latest reply on Feb 14, 2017 2:30 PM by akaine

    Myfaces SERIAL_FACTORY custom implementation in Wildfly 10




      I've been wondering if anyone could help me to identify the classes I should use in Wildfly 10 when implementing/extending serializers.


      In my particular case I want to use the org.apache.myfaces.SERIAL_FACTORY webapp param. And for that I need to provide my own serial factory implementation. To avoid reinventing the wheel I would really prefer to use a built in serializer to achieve that. In older JBoss versions it could be done using the following:

      import org.jboss.serial.io.JBossObjectOutputStream; 
      public class JbossSerialFactory implements SerialFactory{
           public ObjectOutputStream getObjectOutputStream(OutputStream stream) throws IOException{
                return new JBossObjectOutputStream(stream);
           public ObjectInputStream getObjectInputStream(InputStream stream) throws IOException{
                return new MyFacesJBossObjectInputStream(stream);


      import org.jboss.serial.io.JBossObjectInputStream;
      public class MyFacesJBossObjectInputStream extends JBossObjectInputStream{
           public MyFacesJBossObjectInputStream(InputStream stream) throws IOException{
           protected Class resolveClass(ObjectStreamClass desc) throws ClassNotFoundException, IOException{
                     return ClassUtils.classForName(desc.getName());
                }catch(ClassNotFoundException e){
                     return super.resolveClass(desc);


      But as I see since Wildfly came out the org.jboss.serial.io.JBossObjectInputStream class has been removed and I have no idea what class should I use instead.


      Thanks and Regards