Your dba is going to hate you...In general I can think of very few reasons
to store an object in the database. I would suggest something like a command
pattern to handle the situation of not knowing what the array contains.
unless you have a limitless assortment of possibilities. you can use the
command pattern to pass the array around till you find the appropriate
entity bean to store it. likewise on the other side of things to return one
to the client. I guess it is a matter of opinion but I dont store objects in
a blob unless I absolutely have to.

al

----- Original Message -----
From: Igor Rabinovich <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, June 21, 2001 11:06 AM
Subject: RE: [JBoss-user] Urgent: storing vector in the database


> I did not define any new sql type for vector. Vector is java.lang.Object.
I
> don't have any problems with vector but with array which vector class
> contains. I can read the Vector object from the database, but the vector
> size is 0 and data array of vector is empty.
>
> I try not to use any sql statements, but only CMP. I did some research and
> my major problem is how to store array of any type in the database with
CMP.
>
> Igor
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Allen
> fogleson
> Sent: Wednesday, June 20, 2001 5:05 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [JBoss-user] Urgent: storing vector in the database
>
>
> what sql type are you using? blob?
>
> in general I wouldnt serialize a vector to a data table. I would populate
a
> vector (actually probably an array list... ) from sql results.
>
> Al
>
>
> ----- Original Message -----
> From: Igor Rabinovich <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, June 20, 2001 7:41 PM
> Subject: [JBoss-user] Urgent: storing vector in the database
>
>
> > Hi !
> >
> > My entity bean member variable is Vector type. I'm adding elements to
the
> > vector and storing in the database. I can load vector and its element
from
> > the database. But when I restart Application server I can load only
empty
> > vector of size 0. All data get lost.
> >
> > I'm using JBOSS and MySQL with CMP.
> >
> > What the problem???
> >
> > Igor
> >
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to