private void writeObject ( ObjectOutputStream out ) throws IOException { try { out . defaultWriteObject ( ) ; // p113380 - start of change // write out the header information out . write ( EYECATCHER ) ; out . writeShort ( PLATFORM ) ; out . writeShort ( VERSION_ID ) ; // p113380 - end of change // write out the common data if ( DEBUG_ON ) { System . out . println ( "EJBMetaDataImpl.writeObject: ivSession = " + ivSession ) ; } out . writeBoolean ( ivSession ) ; if ( DEBUG_ON ) { System . out . println ( "EJBMetaDataImpl.writeObject: ivStatelessSession = " + ivStatelessSession ) ; } out . writeBoolean ( ivStatelessSession ) ; if ( DEBUG_ON ) { System . out . println ( "EJBMetaDataImpl.writeObject: ivBeanClass is " + ivBeanClassName ) ; //184994 } out . writeUTF ( ivBeanClassName ) ; //184994 if ( DEBUG_ON ) { System . out . println ( "EJBMetaDataImpl.writeObject: ivHomeClass is " + ivHomeClass . getName ( ) ) ; } out . writeUTF ( ivHomeClass . getName ( ) ) ; if ( DEBUG_ON ) { System . out . println ( "EJBMetaDataImpl.writeObject: ivRemoteClass is " + ivRemoteClass . getName ( ) ) ; } out . writeUTF ( ivRemoteClass . getName ( ) ) ; if ( ivSession == false ) { if ( DEBUG_ON ) { System . out . println ( "EJBMetaDataImpl.writeObject: ivPKClass is " + ivPKClass . getName ( ) ) ; } out . writeUTF ( ivPKClass . getName ( ) ) ; } if ( DEBUG_ON ) { System . out . println ( "EJBMetaDataImpl.writeObject: writing HomeHandle" ) ; } out . writeObject ( ivHomeHandle ) ; if ( DEBUG_ON ) { System . out . println ( "EJBMetaDataImpl.writeObject normal exit" ) ; } } catch ( IOException e ) { // FFDCFilter.processException(e, CLASS_NAME + ".writeObject", "439", this); if ( DEBUG_ON ) { System . out . println ( "***ERROR**** EJBMetaDataImpl.readObject caught unexpected exception" ) ; e . printStackTrace ( ) ; } throw e ; } }
We will implement writeObject in order to controll the marshalling for this object . Note this is overriding the default implementation of the Serializable interface .