File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to write and read a CLOB field when using CMP

 
Sean Li
Ranch Hand
Posts: 154
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a table which contains CLOB field, the database i'm using is oracle. when write value to the database when creating or updating a record, when read data from the record, i need to set or get this CLOB field. but how? how to write the codes? because i'm using CMP, it's more convenient but complicated.
could anybody help me?? thanks!
 
Tim Holloway
Saloon Keeper
Pie
Posts: 17646
39
Android Eclipse IDE Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CLOB should map to an EJB field of type java.lang.String.
 
mindows
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
doesn't that depend on what kind of ejb container you use? for example, wls 5.1 doesn't even support clob or blob in cmp. you have to use bmp to access clob/blob columns. wls 7 has OracleBlob for oracle blob or clob. which container lets you just map clob columns to java.lang.String?
 
Sean Li
Ranch Hand
Posts: 154
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've heard weblogic 7 surport Oracle's clob field. but must add <dbms-column-type>OracleClob</dbms-column-type> in the weblogic-cmp-rdbms-jar.xml. and the get and set methods are defined to return and accept java.lang.String.
and I tried, it really works when writting into the table, but when read from the tabel, i got null.
could anybody help me?
 
Sean Li
Ranch Hand
Posts: 154
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can anybody reply my question? really need your help.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic