OracleXMLQuery class with DB2

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • bea

    #1

    OracleXMLQuery class with DB2

    Hi people,

    I have a Java application working with Oracle.
    I need it works with DB2 and the problem is that it uses the
    OracleXMLQuery class.
    This class works OK when it access to tables with TimeStamp, Integer
    and String (varchar) columns but when the column is of BLOB type the
    OracleXMLQuery constructor doesn't work.

    Do you know can I solve the problem?

    Thanks,

  • Knut Stolze

    #2
    Re: OracleXMLQuery class with DB2

    bea wrote:
    Hi people,
    >
    I have a Java application working with Oracle.
    I need it works with DB2 and the problem is that it uses the
    OracleXMLQuery class.
    This class works OK when it access to tables with TimeStamp, Integer
    and String (varchar) columns but when the column is of BLOB type the
    OracleXMLQuery constructor doesn't work.
    >
    Do you know can I solve the problem?
    I guess the reason is that Oracle accesses and handles BLOBs internally
    different than DB2. Also, DB2 has native XML support, which may just make
    no sense with Oracle's implementation. That's not much surprising.

    You will have to use DB2's infrastructure. Maybe some abstraction layer
    that provides a consistent interface to your application - over the Oracle
    and DB2 classes - would be a good idea.

    --
    Knut Stolze
    DB2 z/OS Utilities Development
    IBM Germany

    Comment

    • bea

      #3
      Re: OracleXMLQuery class with DB2

      On Aug 27, 4:16 pm, Knut Stolze <sto...@de.ibm. comwrote:
      bea wrote:
      Hi people,
      >
      I have a Java application working with Oracle.
      I need it works with DB2 and the problem is that it uses the
      OracleXMLQuery class.
      This class works OK when it access to tables with TimeStamp, Integer
      and String (varchar) columns but when the column is of BLOB type the
      OracleXMLQuery constructor doesn't work.
      >
      Do you know can I solve the problem?
      >
      I guess the reason is that Oracle accesses and handles BLOBs internally
      different than DB2. Also, DB2 has native XML support, which may just make
      no sense with Oracle's implementation. That's not much surprising.
      >
      You will have to use DB2's infrastructure. Maybe some abstraction layer
      that provides a consistent interface to your application - over the Oracle
      and DB2 classes - would be a good idea.
      >
      --
      Knut Stolze
      DB2 z/OS Utilities Development
      IBM Germany
      Thank you very much,

      I don´t want to modify the Java application if this is possible.

      I'm searching a Java package similar to the XSU of Oracle for DB2 but
      I haven't found nothing.


      Do you know if it exists anything like that?




      Comment

      • Harold Lee

        #4
        Re: OracleXMLQuery class with DB2

        On Aug 27, 8:43 am, bea <mbeatrizrodrig ...@gmail.comwr ote:
        I don´t want to modify the Java application if this is possible.
        >
        I'm searching a Java package similar to the XSU of Oracle for DB2 but
        I haven't found nothing.
        >
        Do you know if it exists anything like that?
        If you don't want to (or can't) modify the Java code that uses the
        OracleXMLQuery object, why not replace the implementation? The
        interface to OracleXMLQuery seems simple enough, and DB2 has lots of
        features that would help you build an XML representation of a
        ResultSet or SQL String with ease... The OracleXMLDataSe t constructor
        is the only thing that might be hard to replace (but maybe you don't
        need that).

        - Harold

        Comment

        Working...