2 Replies Latest reply on Jun 13, 2014 7:42 AM by Juanjo Alvarez

    How to get the underlaying statement (WrappedStatementJDK6)

    Juanjo Alvarez Newbie

      Hi.

       

      I'm trying to obtain the underlaying statement from a XA connection.

       

      Looking for information I found some code that looks like:

       

      WrappedStatementJDK6 wrappedStatement = (WrappedStatementJDK6)connection.createStatement();

        ... = (castToRealStment) wrappedStatement.getUnderlyingStatement();

       

       

      as far as I know, the class org.jboss.jca.adapters.jdbc.jdk6.WrappedStatementJDK6 is located in the module org.jboss.ironjacamar.jdbcadapters, which is marked as private in the module.xml definition file:

       

      <module xmlns="urn:jboss:module:1.1" name="org.jboss.ironjacamar.jdbcadapters">

          <properties>

              <property name="jboss.api" value="private"/>

          </properties>

      ...

       

      Is there any non private module or another method to get the underlaying statement? I know this will make the application driver dependent but this is not a problem.

       

      Thanks in advance.

       

      EDIT: the main point is to get access to the executeSet method in the SQStatement object (starSQL)