473,396 Members | 2,151 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
Jul 19 '05 #1
7 5038
"Hawkeye" <me@my-deja.nospamcom> wrote in message news:<iYVXb.40926$yE5.160182@attbi_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.
Jul 19 '05 #2

"Carlos" <mi**************@netscape.net> wrote in message
news:1d**************************@posting.google.c om...
"Hawkeye" <me@my-deja.nospamcom> wrote in message news:<iYVXb.40926$yE5.160182@attbi_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.

Jul 19 '05 #3
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.nospamcom> wrote in message news:<iYVXb.40926$yE5.160182@attbi_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

Jul 19 '05 #4
x
I read somewhere in documetation that PL/SQL is better for
database-intensive operations, and JSP for logic-intensive operations.

I can tell you what I use JSP for. We have some XML exchange with our
vendors. Every time new order is created, trigger calls JSP that creates XML
and sends it to servlet on Apache/Tomcat server (outside firewall) which
forwards XML to our vendors. With java classes, it's very easy to program
things like that. Possible that it can be done with PL/SQL, but this way
it's easyer.

Right now, I'm planing to connect my oracle with non-oracle database. Since
I'm on UNIX, lack of ODBC driver prevents me from using heterogeneous
connectivity. I'm trying to load JDBC driver for this non-Oracle database,
and connecto to it through JSP.
Jul 19 '05 #5
What is the DB you need to connect to? I work for an ODBC Driver
vendor (Openlink Software) and we are used in Oracle HS on a regular
basis. The drivers can be less expensive than you might think. Visit
our Website www.openlinksw.com , Or email me directly if you need any
answers.

"x" <x@x.hr> wrote in message news:<c0**********@ls219.htnet.hr>...
I read somewhere in documetation that PL/SQL is better for
database-intensive operations, and JSP for logic-intensive operations.

I can tell you what I use JSP for. We have some XML exchange with our
vendors. Every time new order is created, trigger calls JSP that creates XML
and sends it to servlet on Apache/Tomcat server (outside firewall) which
forwards XML to our vendors. With java classes, it's very easy to program
things like that. Possible that it can be done with PL/SQL, but this way
it's easyer.

Right now, I'm planing to connect my oracle with non-oracle database. Since
I'm on UNIX, lack of ODBC driver prevents me from using heterogeneous
connectivity. I'm trying to load JDBC driver for this non-Oracle database,
and connecto to it through JSP.

Jul 19 '05 #6
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
Jul 19 '05 #7
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.nospamcom> wrote in message
news:iYVXb.40926$yE5.160182@attbi_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

Jul 19 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Suresh Tri | last post by:
Hi all, I am in search of any Enterprise level Opensource Project that uses Java Stored Procedures supported by Oracle. I could not find any by googling. Can any one plese point me to any such...
7
by: Alex | last post by:
Hi all, I am trying to install a java stored procedure via the windows development centre. The linux box is running 8.1 FP4 as is the windoze platform. If I am on the linux box i can install...
3
by: Rhino | last post by:
I've spent the last couple of hours trying to figure out how to debug a Java stored procedure and am just going in circles. The last straw came when I got "Cannot open input stream for default"...
4
by: Rhino | last post by:
Is it possible for a Java Stored Procedure in DB2 V7.2 (Windows) to pass a Throwable back to the calling program as an OUT parameter? If yes, what datatype should I use when registering the...
1
by: Kumar | last post by:
Hi I am trying to recreate a database under the following environments : From: Solaris with DB2UDB version 7.2 with FP 9 To: Linux with DB2UDB version 7.2 with FP 9 It will be of really a...
1
by: Alex | last post by:
Hi all, Just been dabbling with java stored procedures and I'm having problems replacing System: db2 8.1.4 on RH 7.1 linux system 1). Look at java jdbc samples as supplied with db2 and run...
2
by: Kent Lewandowski | last post by:
hi all, Recently I wrote some stored procedures using java jdbc code (admittedly my first stab) and then tried to implement the same within java packages (for code reuse). I encountered...
2
by: Rafael Faria | last post by:
Hi All, We are starting a large data warehousing project using DB2 8.2 on AIX. There is a direction to move any new internal development to Java and a question was raised: Would it be a good...
1
by: esmith2112 | last post by:
We all of a sudden find ourselves in dire straits, because we have one of those mysteries where everything used to work, and apparently, all of a sudden everything went to pot just in time for a...
2
by: Michael | last post by:
Running DB2 v7 UDB ("DB2 v7.1.0.93", "n031208" and "WR21333") on Windows XP, I am unable to find out why the "Build for Debug" option within Stored Procedure Builder is not enabled on Java stored...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.