Subject RE: [Firebird-Java] Re: getObject and blob
Author Goedhart, Andrew
Another issue is to do with EJB app servers such as jBoss. They expect the
BLOB field to return byte[] and therefore fail making the BLOB field
unusable for JBOSS 3.0. I think the BINARY implmentation would be better in
this case.

Andrew

-----Original Message-----
From: Marczisovszky Daniel [mailto:marczi@...]
Sent: Tuesday, March 26, 2002 10:34 AM
To: rrokytskyy
Subject: Re: [Firebird-Java] Re: getObject and blob


>> I think you are right, getObject() should return byte[]. I will
>> correct this after I check the specs once more.

r> Ok, I checked the JDBC 3.0 specs, and on the page B-179 you can find
r> the mapping for ResultSet.getObject() and CallableStatement.getObject
r> (). byte[] should be returned for any BINARY type, and for BLOB you
r> should get the Blob instance.

r> Since the FBBlobField corresponds to the BLOB type (Firebird has no
r> BINARY type, only BLOB), I will not change the type of the object
r> returned in this particular class.

Well, this is an interesting question, although I don't know what is
the difference between BINARY and BLOB...

The interesting thing is the following: if you look at the page 181
and 182, you will see that BLOB should not be accessed by neither
getString nor getBytes, moreover you should not pass a String or a
byte[] to a Blob. So the current behaviour of the FBBlobField is
much more similar to a BINARY field rather than a BLOB field with the
only exception that it returns a Blob instead of byte[] ;) Actually I
can say in the current implementation the FBBlobField *does* implement
the BINARY (VARBINARY, etc...) type, not the BLOB type, and in my
opinion the driver should be consistent in this question.


Best wishes,
Daniel



To unsubscribe from this group, send an email to:
Firebird-Java-unsubscribe@yahoogroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/