sqlj.runtime
Class DefaultRuntime

java.lang.Object
  |
  +--sqlj.runtime.RuntimeContext
        |
        +--sqlj.runtime.DefaultRuntime

public class DefaultRuntime
extends RuntimeContext

The default runtime context is implemented to satisfy the expected runtime behavior of sqlj for most java virtual machine environments.


Fields inherited from class sqlj.runtime.RuntimeContext
DEFAULT_DATA_SOURCE, DEFAULT_RUNTIME, PROPERTY_KEY
 
Constructor Summary
DefaultRuntime()
           
 
Method Summary
TypeMethod
 java.sql.Connection getDefaultConnection()
          The default data source defined in JNDI is used to establish the default connection.
 sqlj.runtime.profile.Loader getLoaderForClass(java.lang.Class forClass)
          Creates and returns a default loader object which uses the class loader of the passed class.
 
Methods inherited from class sqlj.runtime.RuntimeContext
getRuntime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRuntime

public DefaultRuntime()
Method Detail

getLoaderForClass

public sqlj.runtime.profile.Loader getLoaderForClass(java.lang.Class forClass)
Creates and returns a default loader object which uses the class loader of the passed class.
Parameters:
forClass - the class with which the resulting loader is to be associated.
Returns:
a default loader for the passed class
Overrides:
getLoaderForClass in class RuntimeContext
See Also:
DefaultLoader

getDefaultConnection

public java.sql.Connection getDefaultConnection()
The default data source defined in JNDI is used to establish the default connection. If no such data source is defined or the connection cannot be established, then null is returned.
Overrides:
getDefaultConnection in class RuntimeContext