This discussion is archived
0 Replies Latest reply: Sep 5, 2012 11:30 AM by 960219 RSS

Geeting a ORACLE Connection from WebLogic Datasource connection Wrapper

960219 Newbie
Currently Being Moderated
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


  • Correct Answers - 10 points
  • Helpful Answers - 5 points