Java Stored Procedures

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Hawkeye

    Java Stored Procedures

    I am investigating the Java Stored Procedure, first to gain better
    understanding on what this is,
    and also if it would be suitable for a new project which will be running on
    Sun One AS7
    (Client is Swing)

    I have spent about a day reading through many docs, mostly in Oracle site
    and also the
    past newsgroup discussions. Still, I am not clear really on who this Java
    Stored Proc
    technology is intended for. Most of the example are toy examples really.
    Any consensus on who this technology is aimed at and who should really be
    using it?


    Would you use Java Stored Proc and have it contain lots of JDBC calls inside
    it and have it be
    called either by a client or a EJB session bean?

    Any info based on experience would be helpful

    THANKS


  • Carlos

    #2
    Re: Java Stored Procedures

    "Hawkeye" <me@my-deja.nospamcomw rote in message news:<iYVXb.409 26$yE5.160182@a ttbi_s54>...
    I am investigating the Java Stored Procedure, first to gain better
    understanding on what this is,
    and also if it would be suitable for a new project which will be running on
    Sun One AS7
    (Client is Swing)
    >
    I have spent about a day reading through many docs, mostly in Oracle site
    and also the
    past newsgroup discussions. Still, I am not clear really on who this Java
    Stored Proc
    technology is intended for. Most of the example are toy examples really.
    Any consensus on who this technology is aimed at and who should really be
    using it?
    >
    >
    Would you use Java Stored Proc and have it contain lots of JDBC calls inside
    it and have it be
    called either by a client or a EJB session bean?
    >
    Any info based on experience would be helpful
    >
    THANKS
    The power of including java in the DB is difficult to explain but easy
    to understand for those who know Oracle and have experience in working
    on it. Basicaly, it opens a new world of functionalities that can be
    implemented inside the database just there, where PL/SQL lacks.
    It DOES NOT NEED to make JDBC calls to work, it can work without them
    (nevertheless, the built-in JDBC driver works quite fast).

    I will give you an example that is currently working OK in our DB:

    We needed a CRC to secure output XML files. Did we progammed a PL/SQL
    code to implement it? No. We used a java class that does it for us
    (CRC) and loaded it into the DB. Then we wrapped the class in a PL/SQL
    package and now we can call for the CRC for any object we need
    (varchar, clob, etc...). It took us 20 minutes all the process.

    Note that this is how many built-in Oracle procedures are stored.

    Regards.

    Comment

    • Hawkeye

      #3
      Re: Java Stored Procedures


      "Carlos" <miotromailcarl os@netscape.net wrote in message
      news:1de5ebe7.0 402160123.3bbc8 557@posting.goo gle.com...
      "Hawkeye" <me@my-deja.nospamcomw rote in message
      news:<iYVXb.409 26$yE5.160182@a ttbi_s54>...
      I am investigating the Java Stored Procedure, first to gain better
      understanding on what this is,
      and also if it would be suitable for a new project which will be running
      on
      Sun One AS7
      (Client is Swing)

      I have spent about a day reading through many docs, mostly in Oracle
      site
      and also the
      past newsgroup discussions. Still, I am not clear really on who this
      Java
      Stored Proc
      technology is intended for. Most of the example are toy examples really.
      Any consensus on who this technology is aimed at and who should really
      be
      using it?


      Would you use Java Stored Proc and have it contain lots of JDBC calls
      inside
      it and have it be
      called either by a client or a EJB session bean?

      Any info based on experience would be helpful

      THANKS
      >
      The power of including java in the DB is difficult to explain but easy
      to understand for those who know Oracle and have experience in working
      on it. Basicaly, it opens a new world of functionalities that can be
      implemented inside the database just there, where PL/SQL lacks.
      It DOES NOT NEED to make JDBC calls to work, it can work without them
      (nevertheless, the built-in JDBC driver works quite fast).
      >
      I will give you an example that is currently working OK in our DB:
      >
      We needed a CRC to secure output XML files. Did we progammed a PL/SQL
      code to implement it? No. We used a java class that does it for us
      (CRC) and loaded it into the DB. Then we wrapped the class in a PL/SQL
      package and now we can call for the CRC for any object we need
      (varchar, clob, etc...). It took us 20 minutes all the process.
      Does your java code contain any calls to the DB? if so, does it use JDBC
      and/or SQLJ?
      Or is it just java "helper" code
      >
      Note that this is how many built-in Oracle procedures are stored.
      >
      Regards.

      Comment

      • John

        #4
        Re: Java Stored Procedures

        My experience with JSPs is that JDBC calls to the databse are about
        3.5X slower than the same SQL implemented in PL/SQL. Oracle Support
        confirmed that these numbers are what you should expect when running a
        side by side test between PL/SQL and JSPs. If you are going to write
        SQL code that will need to perform optimally, JSPs may not be the
        answer. If your code does not perform SQL or the overhead of the JDBC
        call is acceptable, then java makes a lot of sense.

        "Hawkeye" <me@my-deja.nospamcomw rote in message news:<iYVXb.409 26$yE5.160182@a ttbi_s54>...
        I am investigating the Java Stored Procedure, first to gain better
        understanding on what this is,
        and also if it would be suitable for a new project which will be running on
        Sun One AS7
        (Client is Swing)
        >
        I have spent about a day reading through many docs, mostly in Oracle site
        and also the
        past newsgroup discussions. Still, I am not clear really on who this Java
        Stored Proc
        technology is intended for. Most of the example are toy examples really.
        Any consensus on who this technology is aimed at and who should really be
        using it?
        >
        >
        Would you use Java Stored Proc and have it contain lots of JDBC calls inside
        it and have it be
        called either by a client or a EJB session bean?
        >
        Any info based on experience would be helpful
        >
        THANKS

        Comment

        • Galen Boyer

          #5
          Re: Java Stored Procedures

          On Mon, 16 Feb 2004, me@my-deja.nospamcom wrote:
          I am investigating the Java Stored Procedure, first to gain
          better understanding on what this is, and also if it would be
          suitable for a new project which will be running on Sun One AS7
          (Client is Swing)
          >
          I have spent about a day reading through many docs, mostly in
          Oracle site and also the past newsgroup discussions. Still, I
          am not clear really on who this Java Stored Proc technology is
          intended for. Most of the example are toy examples really. Any
          consensus on who this technology is aimed at and who should
          really be using it?
          I can tell you how we are using it. We are converting an applet
          based application into a J2EE with Oracle backend. The old
          applet actually has alot of data coded in its java code (They
          later tried to retrofit this into a relational store). Instead
          of rewriting all of this hardwired code, we are judiciously
          loading key java code into Oracle and calling it directly.

          Would you use Java Stored Proc and have it contain lots of JDBC
          calls inside it and have it be called either by a client or a
          EJB session bean?
          I don't think I would recommend the java making jdbc calls. I
          would recommend using it when PL/SQL doesn't support your needs.

          --
          Galen Boyer

          Comment

          • David Morse

            #6
            Re: Java Stored Procedures

            FirstSQL/J uses Java as the SP language - static methods are SPs and can be
            called anywhere from standard SQL.

            See www.firstsql.com


            Dave M.
            "Hawkeye" <me@my-deja.nospamcomw rote in message
            news:iYVXb.4092 6$yE5.160182@at tbi_s54...
            I am investigating the Java Stored Procedure, first to gain better
            understanding on what this is,
            and also if it would be suitable for a new project which will be running
            on
            Sun One AS7
            (Client is Swing)
            >
            I have spent about a day reading through many docs, mostly in Oracle site
            and also the
            past newsgroup discussions. Still, I am not clear really on who this Java
            Stored Proc
            technology is intended for. Most of the example are toy examples really.
            Any consensus on who this technology is aimed at and who should really be
            using it?
            >
            >
            Would you use Java Stored Proc and have it contain lots of JDBC calls
            inside
            it and have it be
            called either by a client or a EJB session bean?
            >
            Any info based on experience would be helpful
            >
            THANKS
            >
            >

            Comment

            Working...