oos.writeObject( indirector.indirectForm( nestedDataSource ) );
private void writeObject( ObjectOutputStream oos ) throws IOException { oos.writeShort( VERSION ); oos.writeBoolean(caching); oos.writeObject( factoryClassLocation ); oos.writeObject( identityToken ); oos.writeObject( jndiEnv ); try { //test serialize SerializableUtils.toByteArray(jndiName); oos.writeObject( jndiName ); } catch (NotSerializableException nse) { com.mchange.v2.log.MLog.getLogger( this.getClass() ).log(com.mchange.v2.log.MLevel.FINE, "Direct serialization provoked a NotSerializableException! Trying indirect.", nse); try { Indirector indirector = new com.mchange.v2.naming.ReferenceIndirector(); oos.writeObject( indirector.indirectForm( jndiName ) ); } catch (IOException indirectionIOException) { throw indirectionIOException; } catch (Exception indirectionOtherException) { throw new IOException("Problem indirectly serializing jndiName: " + indirectionOtherException.toString() ); } } }
private void writeObject( ObjectOutputStream oos ) throws IOException { oos.writeShort( VERSION ); oos.writeBoolean(caching); oos.writeObject( factoryClassLocation ); oos.writeObject( identityToken ); oos.writeObject( jndiEnv ); try { //test serialize SerializableUtils.toByteArray(jndiName); oos.writeObject( jndiName ); } catch (NotSerializableException nse) { com.mchange.v2.log.MLog.getLogger( this.getClass() ).log(com.mchange.v2.log.MLevel.FINE, "Direct serialization provoked a NotSerializableException! Trying indirect.", nse); try { Indirector indirector = new com.mchange.v2.naming.ReferenceIndirector(); oos.writeObject( indirector.indirectForm( jndiName ) ); } catch (IOException indirectionIOException) { throw indirectionIOException; } catch (Exception indirectionOtherException) { throw new IOException("Problem indirectly serializing jndiName: " + indirectionOtherException.toString() ); } } }
oos.writeObject( indirector.indirectForm( nestedDataSource ) );
oos.writeObject( indirector.indirectForm( connectionPoolDataSource ) ); oos.writeObject( indirector.indirectForm( extensions ) );
oos.writeObject( indirector.indirectForm( connectionPoolDataSource ) ); oos.writeObject( indirector.indirectForm( extensions ) );
throw new IllegalArgumentException("null indirector is not consistent with " + policy); IndirectlySerialized indirect = indirector.indirectForm( obj ); return toByteArray( indirect );
throw new IllegalArgumentException("null indirector is not consistent with " + policy); IndirectlySerialized indirect = indirector.indirectForm( obj ); return toByteArray( indirect );
throw new IllegalArgumentException("null indirector is not consistent with " + policy); IndirectlySerialized indirect = indirector.indirectForm( obj ); return toByteArray( indirect );