Personal tools
You are here: Home DB2 Problem Resolution Functions and Stored Procedures Common problems with DB2 UDB Java stored procedures
Navigation
Log in


Forgot your password?
 
Document Actions

Common problems with DB2 UDB Java stored procedures

IBM link to solve Common problems with DB2 UDB Java stored procedures



There are numerous advantages to using stored procedures for your database applications. Some of the benefits include reduced network usage, improved performance, and reduced development cost. Java stored procedures have always been one of the most popular routines supported by DB2. One reason is that there are a large number of Java developers due to the popularity of the programming language; thus Java routines usually become the preference when several languages are considered.

Not all DB2 stored procedures should be written in Java. If your business logic requires simple, concise stored procedures, then consider the SQL Procedure Language (SQL PL), as your choice for stored procedure development. SQL stored procedures are always run as trusted stored procedures, and since they do not rely on an external Java Virtual Machine (JVM) process to load the procedure, they are faster than Java routines.

The advantages of using a Java stored procedure are the same advantages you gain when creating any Java application. Java is a very secure programing language. Only the Java bytecode is available to users. Java code can be compiled once, and run on any machine and operating system combination that supports a JVM. Since the Java code runs within a separate JVM, a dangerous operation (one that could cause the JVM to crash) can be handled properly by the JVM. You don't need to implement a separate infrastructure to handle dangerous situations, as Java has built-in mechanisms to catch exceptions, and so on.

Throughout this IBM LINKĀ  we sometimes refer to Java stored procedures as routines. A routine and a stored procedure are synonymous in DB2 UDB. In DB2 V8 the concept of a routine was introduced because it applied to both stored procedures and user-defined functions (UDFs).

This linck discusses common error messages that can be encountered in the life cycle of developing or executing a Java stored procedure. To start off the discussion, we'll cover important concepts and configuration parameters that are important to Java stored procedure development. Next, we describe how to enable DB2 Java. You need to set up the Java environment in order to invoke a Java stored procedure successfully.


http://www.ibm.com/developerworks/data/library/techarticle/dm-0510law/index.html

Security Awareness
Would you like your company to implement gamification into your security awareness program?





Polls