0 Replies Latest reply on Sep 5, 2012 6:30 PM by 960219

    Geeting a ORACLE Connection from WebLogic Datasource connection Wrapper

      Accessing Oracle 'XMLType' column using JDBC DataSource .Needs to get a native Oracle Connection to achieve this . When i get a connection object from the container (WebLogic or Tomcat) i cannot cast the Container wrapped connection to an oracle connection in order to perform the XMLType Binding.

      /*********does not work*******************/
      OracleConnection oconn = (OracleConnection)(( weblogic.jdbc.extensions.WLConnection)connection).getVendorConnection();
      oracle.xdb.XMLType objXML = XMLType.createXML(oconn ,classCodesRequestXML);

      The above problem does not seem to occur if i get the connection object using JDBC driver as the resulting connection object is a straight Oracle connection then .
      Connection = TranManager.getConnectionByJDBCDriver();

      Has anyone encountered this before ?

      Edited by: 957216 on Sep 5, 2012 11:29 AM