private static ARRAY getARRAY(String type_name, Object data) throws JnipapException {
// Create Oracle-friendly array...
java.sql.Connection oconn;
ArrayDescriptor desc;
ARRAY ret;
try {
oconn = DriverManager.getConnection("jdbc:default:connection:");
desc = ArrayDescriptor.createDescriptor(type_name, oconn);
ret = new ARRAY(desc, oconn, data);
} catch(SQLException e) {
throw new JnipapException(e.toString());
}
return ret;