73 lines
4.7 KiB
HTML
73 lines
4.7 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html
|
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html lang="en-us" xml:lang="en-us">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<meta name="security" content="public" />
|
|
<meta name="Robots" content="index,follow" />
|
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
|
<meta name="DC.Type" content="concept" />
|
|
<meta name="DC.Title" content="Restrictions on Java user-defined functions" />
|
|
<meta name="abstract" content="These restrictions apply to Java user-defined functions (UDFs)." />
|
|
<meta name="description" content="These restrictions apply to Java user-defined functions (UDFs)." />
|
|
<meta name="DC.Relation" scheme="URI" content="writeudf.htm" />
|
|
<meta name="DC.Relation" scheme="URI" content="udftable.htm" />
|
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2006" />
|
|
<meta name="DC.Format" content="XHTML" />
|
|
<meta name="DC.Identifier" content="udfrestr" />
|
|
<meta name="DC.Language" content="en-us" />
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
|
<title>Restrictions on Java user-defined functions</title>
|
|
</head>
|
|
<body id="udfrestr"><a name="udfrestr"><!-- --></a>
|
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
|
<h1 class="topictitle1">Restrictions on Java user-defined functions</h1>
|
|
<div><p>These restrictions apply to Java™ user-defined functions (UDFs).</p>
|
|
<p> </p>
|
|
<ul><li>A Java UDF
|
|
should not create additional threads. An additional thread may be created
|
|
in a job only if the job is multithread capable. Since it cannot be guaranteed
|
|
that a job that calls an SQL stored procedure is multithread capable, a Java stored
|
|
procedure should not create additional threads.</li>
|
|
<li>The complete name of the Java stored procedure defined to the database
|
|
is limited to 279 characters. This limit is a consequence of the EXTERNAL_NAME
|
|
column, which has a maximum width of 279 characters.</li>
|
|
<li>Adopted authority cannot be used to access Java class files.</li>
|
|
<li>A Java UDF
|
|
always uses the latest version of the JDK that is installed on the system.</li>
|
|
<li>Since Blob and Clob classes reside in both the java.sql and com.ibm.db2.app
|
|
packages, the programmer must use the entire name of these classes if both
|
|
classes are used in the same program. The program must ensure that the Blob
|
|
and Clob classes from the com.ibm.db2.app are used as the parameters passed
|
|
to the stored procedure.</li>
|
|
<li>Like sourced functions, when a Java UDF is created, a service program in
|
|
the library is used to store the function definition. The name of the service
|
|
program is generated by the system and can be found in the job log of the
|
|
job that created the function. If this object is saved and then restored to
|
|
another system, then the function definition is restored. If a Java UDF
|
|
is to be moved from one system to another, you are responsible for moving
|
|
the service program that contains the function definition as well as the integrated
|
|
file system file that contains the Java class.</li>
|
|
<li>A Java UDF
|
|
cannot set the properties (for example, system naming) of the JDBC connection
|
|
that is used to connect to the database. The default JDBC connection properties
|
|
are always used, except when prefetching is disabled.</li>
|
|
</ul>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="writeudf.htm" title="A Java scalar function returns one value from a Java program to the database. For example, a scalar function could be created that returns the sum of two numbers.">Java user-defined scalar functions</a></div>
|
|
</div>
|
|
<div class="relconcepts"><strong>Related concepts</strong><br />
|
|
<div><a href="udftable.htm" title="DB2 provides the ability for a function to return a table. This is useful for exposing information from outside the database to the database in table form. For example, a table can be created that exposes the properties set in the Java virtual machine (JVM) used for Java stored procedures and Java UDFs (both table and scalar).">Java user-defined table functions</a></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |