Overview | Package | Class | Tree | Deprecated | Index | Help
| BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.beasys.weblogic.helper
Class WebLogicHelper

    java.lang.Object
      |
      +--com.beasys.weblogic.helper.WebLogicHelper

Direct Known Subclasses:
  WebLogicHelperClient

public class WebLogicHelper
extends java.lang.Object
implements ToolkitConstants

Single point of access to the application server. This should make it easy to swap out servers, and processes.

Field Summary
`protected static WebLogicHelper` | `cc` Singleton instance.
`static int` | `CLIENT_SIDE` Startup mode for client.
`protected static boolean` | `debug` Compile out the debug code.
`static int` | `SERVER_SIDE` Startup mode for server.
`protected java.lang.String` | `serverUrl` The weblogic server url.
`protected weblogic.common.T3ServicesDef` | `t3Services` Handle to the Weblogic T3 client class.

Fields inherited from interface com.beasys.util.ToolkitConstants
`DEFAULT_ID_CACHE, DEFAULT_ID_PROCEDURE, DEFAULT_JDBC_POOL_NAME, DEFAULT_LOGGING_LEVEL, DEFAULT_WEBLOGIC_HOST, DEFAULT_WEBLOGIC_PORT, ID_CACHE, ID_PROCEDURE, JDBC_POOL_NAME, LOG_DEBUG, LOG_ERROR, LOG_FATAL, LOG_INFO, LOG_SECURITY, LOG_WARNING, LOGGING_LEVEL, WEBLOGIC_HOST, WEBLOGIC_PORT`

Constructor Summary
`protected` | `WebLogicHelper()` Default constructor.

Method Summary
`void` | `finalize()` Destructor.
`int` | `getBuild()` Get the WebLogic version.
`java.sql.Connection` | `getConnection()` Get a connection to a pooled database connection in Weblogic.
`weblogic.event.common.EventServicesDef` | `getEvents()` Get the T3 events service.
`static WebLogicHelper` | `getInstance()` Get the singleton instance.
`java.math.BigDecimal` | `getNewId()` Get a schema wide unique id.
`PortalProperties` | `getProperties()` Get the TI properties.
`java.lang.Object` | `getService(java.lang.String aLookupName)` Connect to a reference in JNDI referred to by the lookup name.
`protected weblogic.common.T3ServicesDef` | `getT3Services()` Get the services.
`weblogic.time.common.TimeServicesDef` | `getTime()` Get the T3 time service.
`java.lang.String` | `getWebLogicProperty(java.lang.String aPropertyName)` Helper method for getting a weblogic property.
`java.lang.String` | `getWebLogicProperty(java.lang.String aPropertyName, java.lang.String aDefault)` Helper method for getting a weblogic property.
`protected void` | `init()` Init the connections to the app server.
`void` | `log(int aLevel, java.lang.String aMsg)` Write to the weblogic logs, with extra information added.
`void` | `log(int aLevel, java.lang.String appName, java.lang.String aMsg)` Write to the weblogic logs, with extra information added.
`void` | `log(java.lang.String aMsg)` Write to the weblogic logs, with extra information added.
`static void` | `setStartupMode(int aMode)` How should the singleton be set up.
`void` | `setupConnection()` creates a T3Client connection to the Tengah server, creates a jndi context to lookup the TRVClientServices object, and creates a TRVClient

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SERVER_SIDE

    public static final int SERVER_SIDE

  Startup mode for server.

### CLIENT_SIDE

    public static final int CLIENT_SIDE

  Startup mode for client.

### debug

    protected static final boolean debug

  Compile out the debug code.

### cc

    protected static WebLogicHelper cc

  Singleton instance.

### t3Services

    protected weblogic.common.T3ServicesDef t3Services

  Handle to the Weblogic T3 client class.

### serverUrl

    protected java.lang.String serverUrl

  The weblogic server url. something similar to t3://localhost:7001

Constructor Detail

### WebLogicHelper

    protected WebLogicHelper()

  Default constructor.

Method Detail

### finalize

    public void finalize()
                  throws java.lang.Throwable

  Destructor.
  Overrides:
    finalize in class java.lang.Object

### setStartupMode

    public static void setStartupMode(int aMode)

  How should the singleton be set up.
  Parameters:
    `int` - the mode

### getInstance

    public static WebLogicHelper getInstance()

  Get the singleton instance.
  Returns:
    WebLogicHelper

### getT3Services

    protected weblogic.common.T3ServicesDef getT3Services()

  Get the services. Subclasses should implement if different.

### getEvents

    public weblogic.event.common.EventServicesDef getEvents()

  Get the T3 events service.
  Returns:
    EventServicesDef the event services.

### getTime

    public weblogic.time.common.TimeServicesDef getTime()

  Get the T3 time service.
  Returns:
    TimeServicesDef the time services.

### init

    protected void init()

  Init the connections to the app server.

### setupConnection

    public void setupConnection()
                         throws ToolkitException

  creates a T3Client connection to the Tengah server, creates a jndi context to lookup the TRVClientServices object, and creates a TRVClient
  Throws:
    ToolkitException - holder for any exception

### getService

    public java.lang.Object getService(java.lang.String aLookupName)
                                throws ToolkitException

  Connect to a reference in JNDI referred to by the lookup name.
  Parameters:
    `String` - the lookup name.
  Returns:
    Object the object referenced by the name. Use this to get handles to Home interfaces, RMI objects, etc.
  Throws:
    ToolkitException - holder for any exception

### getProperties

    public PortalProperties getProperties()

  Get the TI properties.
  Returns:
    PortalProperties the properties list.

### log

    public void log(java.lang.String aMsg)

  Write to the weblogic logs, with extra information added. The granularity is defined in the properties file.
  Parameters:
    `String` - the message, if null it will ignore.

### log

    public void log(int aLevel,
                    java.lang.String aMsg)

  Write to the weblogic logs, with extra information added. The granularity is defined in the properties file.
  Parameters:
    `int` - aLevel Possible error levels are: FrameworkConstants.LOG_DEBUG FrameworkConstants.LOG_INFO FrameworkConstants.LOG_WARNING FrameworkConstants.LOG_ERROR FrameworkConstants.LOG_FATAL FrameworkConstants.LOG_SECURITY
    `String` - the message, if null it will ignore.

### getBuild

    public int getBuild()

  Get the WebLogic version.
  Returns:
    the version.

### log

    public void log(int aLevel,
                    java.lang.String appName,
                    java.lang.String aMsg)

  Write to the weblogic logs, with extra information added. The granularity is defined in the properties file.
  Parameters:
    `int` - aLevel Possible error levels are: FrameworkConstants.LOG_DEBUG FrameworkConstants.LOG_INFO FrameworkConstants.LOG_WARNING FrameworkConstants.LOG_ERROR FrameworkConstants.LOG_FATAL FrameworkConstants.LOG_SECURITY
    `appName` - the name of the application logging the message
    `String` - the message, if null it will ignore.

### getConnection

    public java.sql.Connection getConnection()
                                      throws ToolkitException,
                                             java.sql.SQLException

  Get a connection to a pooled database connection in Weblogic. Depending on whether this is client side or server side it will get the connection two different ways.
  Returns:
    Connection pooled connection

### getNewId

    public java.math.BigDecimal getNewId()
                                  throws ToolkitException

  Get a schema wide unique id.
  Returns:
    BigDecimal the new id.

### getWebLogicProperty

    public java.lang.String getWebLogicProperty(java.lang.String aPropertyName,
                                                java.lang.String aDefault)

  Helper method for getting a weblogic property.
  Parameters:
    `the` - property name.
  Returns:
    the value, if null, will return default value.

### getWebLogicProperty

    public java.lang.String getWebLogicProperty(java.lang.String aPropertyName)

  Helper method for getting a weblogic property.
  Parameters:
    `the` - property name.
  Returns:
    the value, can be null

Overview | Package | Class | Tree | Deprecated | Index | Help
| BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 BEA Systems, Inc. All Rights Reserved