geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianny Damour <gianny.dam...@optusnet.com.au>
Subject BLOB manipulation - question
Date Sun, 28 Nov 2004 23:16:06 GMT
Hi,

I am working on the support of Dependent Value Classes.

The implementation is rather simple: if a binding is not explicitely 
defined for a CMP field class (see 
org.tranql.sql.jdbc.binding.BindingFactory) and if the class implements 
Serializable, then one assumes that the CMP field is a Dependent Value 
Class. Such CMP fields are stored into BLOB columns.

The serialized object is stored into the BLOB via the 
PreparedStatement.setBinaryStream(int parameterIndex, 
java.io.InputStream x, int length) method. As a matter of fact, this 
works with Derby. Yet, it seems that this is not the "correct" way. More 
accurately, it seems that PreparedStatement.setBlob (int i, Blob x) is 
the "correct" way.

Anyone knows if PreparedStatement.setBinaryStream is portable?

Thanks,
Gianny

Mime
View raw message