Re: jpublisher Question. Please help.

From: deejay <djuravel_at_dgny.com>
Date: 23 Oct 2001 06:13:00 -0700
Message-ID: <f7b19882.0110230513.21b2f438_at_posting.google.com>


I'd like to add the stored procedure's code to the original question. It might be helpful to anyone that's trying to help me.The type mapping written there. Maybe I left out something in the type mapping.

//THE STORED PROCEDURE import java.sql.*;
import Inner_Objtyp;
import Outer_Objtyp;

public class SubClssProc
{
  public static void procOuter(Outer_Objtyp outerObj) throws Exception   {
    Connection conn = new
oracle.jdbc.driver.OracleDriver().defaultConnection();     

    try {

      // DB MAPPING
      java.util.Map map = conn.getTypeMap();
      map.put("MACH_ADMN.OUTER_OBJTYP",
        Class.forName("Outer_Objtyp"));
                       
      map.put("MACH_ADMN.INNER_OBJTYP",
        Class.forName("Inner_Objtyp"));
        
      conn.setTypeMap(map);

      System.out.println("Here1");
      System.out.println("outerObj.outer_fld "    +
outerObj.getOuterFld() +
                         "outerObj.innerObj.inner_fld " +
                          outerObj.getInnerObj().getInnerFld());
    }
    catch (Exception e) {
      if (e instanceof SQLException)
        System.out.println( String.valueOf( ((SQLException)
e).getSQLState() );
      e.printStackTrace();
      System.out.println("Message: " + e.getMessage());
    }   // End Catch
  }     // End Method
}       // End Class
Received on Tue Oct 23 2001 - 15:13:00 CEST

Original text of this message