ahhh, yes, that sounds like the problem I was trying to work around. Am I
correct in assuming that you have an array of byte[] that you then convert
using Base64 to a String object. If you then have the String object as
the persistent field it should work fine. eg:
public class MyEJB
{
public String myBytes;
public void setBytes(byte[] b)
{
myBytes = Base64.encode(b);
}
public byte[] getBytes()
{
return Base64.decode(myBytes);
}
}
something like that... I'll also not take credit for this, there's someone
on the list (or was at least) who suggested this to me a while back.
cheesr
dim
On Wed, 25 Jul 2001, Scott Stevelinck wrote:
> Technically the column data type is 'OID', the Java object is String, and my
> mapping is:
>
> <jdbc-type>BLOB</jdbc-type>
> <sql-type>OID</sql-type>
>
> in my jaws.xml.
>
> ----- Original Message -----
> From: "Scott Stevelinck" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 25, 2001 11:03 PM
> Subject: Re: [JBoss-user] CMP of a byte[] array vanishes on
> re-deployment(fwd)
>
>
> > Yes, I'm storing it as text.
> >
> > ----- Original Message -----
> > From: "Dmitri Colebatch" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, July 25, 2001 8:05 PM
> > Subject: Re: [JBoss-user] CMP of a byte[] array vanishes on
> > re-deployment(fwd)
> >
> >
> > > sorry - itchy trigger finger... as I was saying...
> > >
> > > if you're encoding it as Base64 I'm assuming its text... just checking -
> I
> > > have this situation working fine with text.
> > >
> > > cheesr
> > > dim
> > >
> > > ---------- Forwarded message ----------
> > > Date: Thu, 26 Jul 2001 10:03:59 +1000 (EST)
> > > From: Dmitri Colebatch <[EMAIL PROTECTED]>
> > > To: [EMAIL PROTECTED]
> > > Subject: Re: [JBoss-user] CMP of a byte[] array vanishes on
> re-deployment
> > >
> > > Are you saving the field as text of byte[]. If you're encoding
> > >
> > > On Wed, 25 Jul 2001, Scott Stevelinck wrote:
> > >
> > > > I have what I would consider an extremely odd issue. I'm encoding a
> > > > byte[] using Base64 into a container managed field. I'm using
> > > > Postgres as my back end database. Everything works fine when the bean
> > > > read/writes that byte[] array to the database (of course it's actually
> > > > writing the encoded string to an OID field in the back end table).
> > > > Now the problem, if I re-deploy the bean ALL the byte[] get changed to
> > > > something odd that's only 6k, when they were 12k-14k before the
> > > > re-deployment. All the other fields in the table remain untouched.
> > > >
> > > > I've inserted debug code into the bean and it doesn't appear that
> > > > ejbStore() is getting called, which should be the ONLY place a db
> > > > write is occurring. I don't see anything funny in the server.log that
> > > > would indicate the database is being modified?
> > > >
> > > > Any ideas??
> > > >
> > > > --Scott
> > > >
> > >
> > >
> > >
> > > _______________________________________________
> > > 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