|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sqlj.runtime.RuntimeContext
The runtime context defines system-specific services to be provided by the runtime environment. The runtime context is an abstract class whose implementation may vary according to the Java VM environment.
Field Summary | |
static java.lang.String |
DEFAULT_DATA_SOURCE
The JNDI name of the data source used to create the default connection. |
static java.lang.String |
DEFAULT_RUNTIME
The fully qualified class name of the default runtime implementation used when no other implementation has been defined for a VM environment. |
static java.lang.String |
PROPERTY_KEY
The key under which the RuntimeContext implementation class name is stored in the system properties. |
Constructor Summary | |
RuntimeContext()
|
Method Summary | |
abstract java.sql.Connection |
getDefaultConnection()
Returns the default connection object, if one exists, or null otherwise. |
abstract sqlj.runtime.profile.Loader |
getLoaderForClass(java.lang.Class forClass)
Returns a loader associated with a class. |
static RuntimeContext |
getRuntime()
Returns the runtime context associated with the current java virtual machine instance. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String PROPERTY_KEY
public static final java.lang.String DEFAULT_RUNTIME
sqlj.runtime.DefaultRuntime
public static final java.lang.String DEFAULT_DATA_SOURCE
Constructor Detail |
public RuntimeContext()
Method Detail |
public static RuntimeContext getRuntime()
Note: all runtime implementations must be able to be constructed
via the Class.newInstance
method. That is, they must
have a public no-arg constructor.
PROPERTY_KEY
,
DEFAULT_RUNTIME
public abstract sqlj.runtime.profile.Loader getLoaderForClass(java.lang.Class forClass)
It is assumed that the passed class argument contains enough information that a java virtual machine implementation will be able to determine the location in which to find related resources. Most VM implementations will be able to use the passed class's class loader (or the system class loader if the class has no loader). However, some VM implementations may need additional information to resolve resources. For example, a VM running in a DB server might use the schema in which the passed class is located to search for related resources.
forClass
- the class with which the resulting loader is to be
associated.public abstract java.sql.Connection getDefaultConnection()
If the default data source is defined in JNDI, then it is used to establish the default connection.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |