• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to write and read a CLOB field when using CMP

 
Ranch Hand
Posts: 154
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
CLOB should map to an EJB field of type java.lang.String.
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
can anybody reply my question? really need your help.
 
reply
    Bookmark Topic Watch Topic
  • New Topic