All Packages Class Hierarchy This Package Previous Next Index
Class JBMSTours.ApplicationMode
java.lang.Object
|
+----JBMSTours.ApplicationMode
- public class ApplicationMode
- extends Object
Look at the Source.
This class is used by the classes with main methods. It parses the
arguments on the command line. If a host name and port number
are specified, then the application is a client application and
uses the Cloudconnector driver name and Cloudconnector URL. If there is additionally
a single character, "r," the application is an RmiJdbc client application,
and the correct driver and URL are used. Otherwise, the
application is in the embedded mode. The driver name is the standard
embedded Cloudscape driver and the URL is the standard Cloudscape URL.
It includes methods for connecting and disconnecting. You can use
this to connect to a database.
It connects in the correct mode for the application (embedded or client).
It assumes that the name of the database is toursDB. To connect
to a different database, supply a value for the property JBMSTours.dbName.
-
CLIENTDRIVER
- Cloudconnector client driver name
-
CLOUDCONNECTCLIENT
- Cloudconnector client mode
-
EMBEDDED
- embedded mode
-
EMBEDDEDDRIVER
- embed driver name
-
RMICLIENTDRIVER
- RmiJdbc client driver
-
RMIJDBCCLIENT
- RmiJdbc client mode
-
ApplicationMode()
-
-
ApplicationMode(String, String)
- constructor for Cloudconnector client application mode.
-
ApplicationMode(String, String, String)
- Constructor for RmiJdbc client application mode
-
ApplicationMode(String[])
- Constructor
-
connectToCloudscape()
- Smart Method for connecting to Cloudscape.
-
connectToCloudscape(String)
- Smart Method for connecting to Cloudscape.
-
getDatabaseName()
- Returns the database name--either the default, toursDB,
or an alternate provided in a JVM property
-
quitCloudscape()
- Smart Method for quitting Cloudscape.
EMBEDDED
public static final short EMBEDDED
- embedded mode
CLOUDCONNECTCLIENT
public static final short CLOUDCONNECTCLIENT
- Cloudconnector client mode
RMIJDBCCLIENT
public static final short RMIJDBCCLIENT
- RmiJdbc client mode
EMBEDDEDDRIVER
public static final String EMBEDDEDDRIVER
- embed driver name
CLIENTDRIVER
public static final String CLIENTDRIVER
- Cloudconnector client driver name
RMICLIENTDRIVER
public static final String RMICLIENTDRIVER
- RmiJdbc client driver
ApplicationMode
public ApplicationMode()
ApplicationMode
public ApplicationMode(String hst,
String prt)
- constructor for Cloudconnector client application mode.
ApplicationMode
public ApplicationMode(String hst,
String prt,
String r)
- Constructor for RmiJdbc client application mode
ApplicationMode
public ApplicationMode(String arg[])
- Constructor
getDatabaseName
public static String getDatabaseName()
- Returns the database name--either the default, toursDB,
or an alternate provided in a JVM property
- Returns:
- String database name
connectToCloudscape
public Connection connectToCloudscape(String andAttributes) throws Throwable
- Smart Method for connecting to Cloudscape.
Knows whether you are embedded or
a client. Takes the ;attribute=value portion of the URL as an argument
- Parameters:
- String - ;attribute=value portion of the URL
- Returns:
- Connection Connection to the database
- Throws: Throwable
- if an error occurs
connectToCloudscape
public Connection connectToCloudscape() throws Throwable
- Smart Method for connecting to Cloudscape.
Knows whether you are embedded or
a client. No arguments (no attributes).
- Returns:
- Connection Connection to the database
- Throws: Throwable
- if an error occurs
quitCloudscape
public boolean quitCloudscape()
- Smart Method for quitting Cloudscape. Knows whether you are embedded or
a client. If you are embedded, it shuts down Cloudscape.
If not, it doesn't.
- Returns:
- boolean if the application quit Cloudscape properly
All Packages Class Hierarchy This Package Previous Next Index