All Examples  This Package

Class examples.t3client.StartupQuery

java.lang.Object
   |
   +----examples.t3client.StartupQuery

public class StartupQuery
extends Object
implements T3ServletDef, T3StartupDef
The StartupQuery example illustrates three different facets of the WebLogic Server architecture:

This example requres a Cloudscape database instance. You'll need to register this class as a startup class in your weblogic.properties file, as detailed in the description of the startup() method.


Constructor Index

 o StartupQuery()

Method Index

 o declareParams(ParamSet)
This method implements the WebLogic T3Servlet interface.
 o execute(ParamSet)
This method implements the WebLogic T3Servlet interface.
 o setServices(T3ServicesDef)
This method implements the WebLogic T3Servlet interface.
 o startup(String, Hashtable)
The startup() method is called at WebLogic startup, as a result of placing the following lines in the weblogic.properties file:
weblogic.system.startupClass.doquery=examples.t3client.StartupQuery
    weblogic.system.startupArgs.doquery=\
    query=select * from emp,\
    db=jdbc:weblogic:pool:demoPool

where "db" is the URL of your database pool that contains a table that you include in the arg "query".

Constructors

 o StartupQuery
 public StartupQuery()

Methods

 o startup
 public String startup(String name,
                       Hashtable args) throws Exception
The startup() method is called at WebLogic startup, as a result of placing the following lines in the weblogic.properties file:
weblogic.system.startupClass.doquery=examples.t3client.StartupQuery
    weblogic.system.startupArgs.doquery=\
    query=select * from emp,\
    db=jdbc:weblogic:pool:demoPool

where "db" is the URL of your database pool that contains a table that you include in the arg "query".

When startup is invoked as a result of these two lines, the "name" argument will be "doquery" (from the left-hand of the property), and the args hashtable will contain the name-value pair "query", "select * from emp".

 o setServices
 public void setServices(T3ServicesDef services)
This method implements the WebLogic T3Servlet interface.

The setServices() method is called to pass to the T3Servlet the handle of an object that can be used to access WebLogic services. This makes another reference to the services object so it can be used later.

Parameters:
services - Services stub
 o declareParams
 public void declareParams(ParamSet ps) throws ParamSetException
This method implements the WebLogic T3Servlet interface.

The declareParams() method is called to specify the parameters that this T3Servlet will accept. WebLogic calls this method when the server-side object is instantiated.

Parameters:
ps - ParamSet
Throws: ParamSetException
if there is an error in the ParamSet
 o execute
 public void execute(ParamSet ps) throws Exception
This method implements the WebLogic T3Servlet interface.

The execute() method is called when the client requests the invocation of this servlet. the ParamSet contains the arguments for the execute() method.

Parameters:
ps - ParamSet
Throws: Exception
if there is an error in execution

All Examples  This Package