com.caucho.quercus.lib
Class ResinModule

java.lang.Object
  extended by com.caucho.quercus.module.AbstractQuercusModule
      extended by com.caucho.quercus.lib.ResinModule
All Implemented Interfaces:
QuercusModule

public class ResinModule
extends AbstractQuercusModule


Nested Class Summary
static class ResinModule.QuercusDistcache
           
 
Field Summary
static int XA_STATUS_ACTIVE
           
static int XA_STATUS_COMMITTED
           
static int XA_STATUS_COMMITTING
           
static int XA_STATUS_MARKED_ROLLBACK
           
static int XA_STATUS_NO_TRANSACTION
           
static int XA_STATUS_PREPARED
           
static int XA_STATUS_PREPARING
           
static int XA_STATUS_ROLLEDBACK
           
static int XA_STATUS_ROLLING_BACK
           
static int XA_STATUS_UNKNOWN
           
 
Fields inherited from class com.caucho.quercus.module.AbstractQuercusModule
PHP_INI_ALL, PHP_INI_PERDIR, PHP_INI_SYSTEM, PHP_INI_USER
 
Constructor Summary
ResinModule()
           
 
Method Summary
 java.lang.Object java_bean(java.lang.String name)
          Returns the matching webbeans.
static java.lang.Object jndi_lookup(java.lang.String name)
          Perform a jndi lookup to retrieve an object.
static ArrayValue mbean_explode(java.lang.String name)
          Explode an object name into an array with key value pairs that correspond to the keys and values in the object name.
static java.lang.String mbean_implode(ArrayValue exploded)
          Implode an array into an object name.
static boolean resin_clear_state(Env env)
          Clears the current state
static void resin_clear_states()
          Clears all states.
static ResinModule.QuercusDistcache resin_create_distcache(Env env, java.lang.String name)
           
static boolean resin_dump_stack(Env env)
          Prints a debug version of the variable
static boolean resin_restore_state(Env env)
          Restore the current state
static boolean resin_save_state(Env env)
          Save the current state
static Value resin_string_to_binary(Env env, java.lang.String string, java.lang.String encoding)
          Converts a string into its binary representation, according to the given encoding, if given, or the script encoding if not given.
static Value resin_var_dump(Env env, Value[] args)
          Prints a debug version of the variable
static java.lang.String resin_version()
          Returns the version of the Resin server software.
static boolean xa_begin(Env env)
          Starts a new distributed transaction.
static boolean xa_commit(Env env)
          Commits the current transaction.
static boolean xa_rollback_only(Env env)
          Sets the rollback_only status for the current transaction.
static boolean xa_rollback(Env env)
          Complets the current transaction by rolling it back.
static boolean xa_set_timeout(Env env, int timeoutSeconds)
          Sets the timeout for the current distribued transaction.
static int xa_status()
          Returns the JTA status code for the current transation.
 
Methods inherited from class com.caucho.quercus.module.AbstractQuercusModule
addConstant, addConstant, addConstant, getConstMap, getIniDefinitions, getLoadedExtensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XA_STATUS_ACTIVE

public static final int XA_STATUS_ACTIVE
See Also:
Constant Field Values

XA_STATUS_MARKED_ROLLBACK

public static final int XA_STATUS_MARKED_ROLLBACK
See Also:
Constant Field Values

XA_STATUS_PREPARED

public static final int XA_STATUS_PREPARED
See Also:
Constant Field Values

XA_STATUS_COMMITTED

public static final int XA_STATUS_COMMITTED
See Also:
Constant Field Values

XA_STATUS_ROLLEDBACK

public static final int XA_STATUS_ROLLEDBACK
See Also:
Constant Field Values

XA_STATUS_UNKNOWN

public static final int XA_STATUS_UNKNOWN
See Also:
Constant Field Values

XA_STATUS_NO_TRANSACTION

public static final int XA_STATUS_NO_TRANSACTION
See Also:
Constant Field Values

XA_STATUS_PREPARING

public static final int XA_STATUS_PREPARING
See Also:
Constant Field Values

XA_STATUS_COMMITTING

public static final int XA_STATUS_COMMITTING
See Also:
Constant Field Values

XA_STATUS_ROLLING_BACK

public static final int XA_STATUS_ROLLING_BACK
See Also:
Constant Field Values
Constructor Detail

ResinModule

public ResinModule()
Method Detail

resin_string_to_binary

public static Value resin_string_to_binary(Env env,
                                           java.lang.String string,
                                           java.lang.String encoding)
Converts a string into its binary representation, according to the given encoding, if given, or the script encoding if not given.


java_bean

public java.lang.Object java_bean(java.lang.String name)
Returns the matching webbeans.


jndi_lookup

public static java.lang.Object jndi_lookup(java.lang.String name)
Perform a jndi lookup to retrieve an object.

Parameters:
name - a fully qualified name "java:comp/env/foo", or a short-form "foo".
Returns:
the object, or null if it is not found.

resin_version

public static java.lang.String resin_version()
Returns the version of the Resin server software.


xa_begin

public static boolean xa_begin(Env env)
Starts a new distributed transaction.


xa_commit

public static boolean xa_commit(Env env)
Commits the current transaction.


xa_rollback

public static boolean xa_rollback(Env env)
Complets the current transaction by rolling it back.


xa_rollback_only

public static boolean xa_rollback_only(Env env)
Sets the rollback_only status for the current transaction.


xa_set_timeout

public static boolean xa_set_timeout(Env env,
                                     int timeoutSeconds)
Sets the timeout for the current distribued transaction.


xa_status

public static int xa_status()
Returns the JTA status code for the current transation.


mbean_explode

public static ArrayValue mbean_explode(java.lang.String name)
Explode an object name into an array with key value pairs that correspond to the keys and values in the object name. The domain is stored in the returned array under the key named ":domain:".


mbean_implode

public static java.lang.String mbean_implode(ArrayValue exploded)
Implode an array into an object name. The array contains key value pairs that become key vlaue pairs in the object name. The key with the name ":domain:" becomes the domain of the object name.


resin_dump_stack

public static boolean resin_dump_stack(Env env)
Prints a debug version of the variable

Parameters:
env - the quercus calling environment
v - the variable to print
Returns:
the escaped stringPhp

resin_var_dump

public static Value resin_var_dump(Env env,
                                   Value[] args)
Prints a debug version of the variable

Parameters:
env - the quercus calling environment
v - the variable to print
Returns:
the escaped stringPhp

resin_restore_state

public static boolean resin_restore_state(Env env)
Restore the current state


resin_save_state

public static boolean resin_save_state(Env env)
Save the current state


resin_clear_state

public static boolean resin_clear_state(Env env)
Clears the current state


resin_clear_states

public static void resin_clear_states()
Clears all states.


resin_create_distcache

public static ResinModule.QuercusDistcache resin_create_distcache(Env env,
                                                                  java.lang.String name)