• Post Reply Bookmark Topic Watch Topic
  • New Topic

Urgent - DB2 XML entender  RSS feed

Vladimir Ergovic
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using BMP Entity Bean to store xml to a column but JDBC is cutting my data at 16K, 48K etc. There is no chance to store it complete. I ve already tried with setObject(..), setClob and setString but it doesn't work (acctualy it works for small xml but I have big ones like 2Mb and they don't fit only the small ones are OK.
This is the code:
<env-entry-value>insert into paket_xml (paket_id,xml_signed,mbr,xml_msg) values (?,?,?, ?)</env-entry-value>

String packetId,
String signedXmlMessage,
String xmlMessage,
String mbr)
throws javax.ejb.CreateException {
PreparedStatement ps = null;
try {
ps = con.prepareStatement(EnviromentUtil.getEnvString("sql.ejbCreate"));
ps.setString(1, packetId);
ps.setObject(2, signedXmlMessage.getBytes(), Types.BLOB);
ps.setString(3, mbr);
//ps.setString(4, ); //.getBytes(),Types.CLOB);
ps.setObject(4, this.xmlMessage.getBytes(), Types.BLOB);
int rez = ps.executeUpdate();
} catch (Exception e) {
throw new EJBException("ejbCreate: " + e.getMessage());
this.xmlMessage = xmlMessage;
this.signedXmlMessage = signedXmlMessage;
this.packetId = packetId;
this.mbr = mbr;
return new ArchiveEntityKey(packetId);
So if anyone have any kid please HELP !!!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!