What kind of class are you trying to serialize?
If you are trying to serialize a "long" String you can better use the
jaws.xml file inside your ejb file.
In that file you can define the field aand reference to another jbdc-type
and sql-type even if the type is already defined in standardjaws.xml.
in the following example I have a description field which is a String but
will not be mapped to VARCHAR(255) but to an TEXT field in MySQL
Maybe this will help you?
Greetings Ralph
<jaws>
<datasource>mySQL</datasource>
<type-mapping>mySQL</type-mapping>
<default-entity>
<create-table>true</create-table>
<remove-table>false</remove-table>
<tuned-updates>true</tuned-updates>
<read-only>false</read-only>
<time-out>300</time-out>
</default-entity>
<enterprise-beans>
<entity>
<ejb-name>SampleBean</ejb-name>
<cmp-field>
<field-name>description</field-name>
<jdbc-type>LONGVARCHAR</jdbc-type>
<sql-type>TEXT</sql-type>
</cmp-field>
</entity>
</enterprise-beans>
</jaws>
On 01/29/2001 10:16:12 AM jboss-user wrote:
> Hello!
>
> I'm using jBoss 2.0 Final in connection with MySQL. I would like to save
a
> serializable class as a blob field in my db-table.
> In jaws.xml I saw that a blob field refers to java.lang.Object. So I
created
> a byte array of my serializable class and casted it to java.lang.Object
in
> my Bean. But this fails. All other fields like Strings, ints are working
> correctly, but only my blob does not.
>
>
> Anybody solved this problem before?
>
> Regards,
> Bjarne
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
List Help?: [EMAIL PROTECTED]