0 Replies Latest reply on Apr 22, 2010 3:17 AM by Izidor Pokrivac

    Using java.sql.Array in stored procedure call on pooled connection or not?

    Izidor Pokrivac Newbie

      We build J2EE application. We have JBoss 4.2.3.GA, Java 6, Oracle 11.1.0.7.

       

      Our dilemma is about safe using of Arrays in stored procedures call on pooled connections from EJB container. If you want to use arrays (java.sql.Array) you need to have access to native Connection. Our code:

       

                  ArrayDescriptor desc = ArrayDescriptor.createDescriptor(
                          "ARRAY_INTEGER", ((WrappedConnectionJDK6) cs
                                  .getConnection()).getUnderlyingConnection());

      Is it safe to use native connection from the container in JBoss?
      Can we have problems with the future use of these pooled connections?
      IBM is warning to use arrays (Data access portability features), because you need to use methods outside of the protective mechanisms of WebSphere Application Server.
      Is it ok to use arrays in JBoss or is it better to use alternative solution (such as use of string with delimiter)?