www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
java_call_method
java_get_property
java_load_class
java_new_object
java_set_property
java_vm_attach
java_vm_detach
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
XML
XPATH & XQUERY

Functions Index

java_vm_attach

java_vm_attach (in classpath varchar, [in vm_options any]);
Description

Ensures that the current working thread is attached to the Java VM. It operates as follows:

  • if the Java VM is not created it creates it.
  • if the java VM is running, but the current working thread is not attached as a Java VM thread it attaches it.
  • if none of the above it returns.

The java_vm_attach() function is called implicitly in each of the other VSEs, and also when allocating, copying or deleting a Virtuoso/PL reference to a Java VM object values.

If the Java VM is already initialized and the classpath is supplied it will throw a SQL error. If the Java VM is not initialized, but it is required to execute a statement the server will implicitly call java_vm_attach (NULL);. The Virtuoso Java VM integration binary works with JDK 1.2 and later.

Parameters
classpath – The classpath string to be supplied to the Java VM. If classpath is NULL the server OS environment variable CLASSPATH will be used instead.
vm_options – A vector of name/value pairs for the Java VM initialization parameters. The format and values of the parameters is described in the JNI Enhancements Introduced in version 1.2 of the JavaTM 2 SDK document - the description of JNI_CreateJavaVM Invocation API function.