|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface replaces the functionality of SybDriver.
It should only be used by applications responsible for administering your environment. The interface provides several accessor and mutator methods (following the JavaBeans convention) to configure the DataSource. These standard properties are defined in the JDBC 2.0 standard extension specification on page 12. Note: there is currently no support for roleName.
This interface also provides the setConnectionProperties method which allows users to set jConnect connection properties -- in the same way that they did on the JDBC URL or within client code using DriverManager.getConnection(String, Properties).
Typically, when the object that implements this interface is stored on the name server, it should only be accessed via one of the javax.sql DataSource interfaces. That is, the client shouldn't need to access any of these methods, they are strictly intended to be used to configure DataSources before they are deployed.
This interface is both Referenceable and Serializable so that it can be stored by any number of name servers, and retrieved via JNDI and the SybObjectFactory. However, upon retrieval the following properties will not be restored (they are transient):
Field Summary | |
static String |
CONNECTION_PROPERTY
methods for this attribute are: getConnectionProperty(String) and
setConnectionProperties(Properties) . |
static String |
DATA_SOURCE_NAME
methods for this attribute are: getDataSourceName() and
setDataSourceName(String) . |
static String |
DATABASE_NAME
methods for this attribute are: getDatabaseName() and
setDatabaseName(String) . |
static String |
DESCRIPTION
methods for this attribute are: getDescription() and
setDescription(String) . |
static String |
NETWORK_PROTOCOL
methods for this attribute are: getNetworkProtocol() and
setNetworkProtocol(String) . |
static String |
PASSWORD
methods for this attribute are: getPassword() and
setPassword(String) . |
static String |
PORT_NUMBER
methods for this attribute are: getPortNumber() and
setPortNumber(int) . |
static String |
SERVER_NAME
methods for this attribute are: getServerName() and
setServerName(String) . |
static String |
USER
methods for this attribute are: getUser() and
setUser(String) . |
Method Summary | |
DynamicClassLoader |
getClassLoader(String url,
Properties props)
Return a new class loader which will connect with the specified url and properties. |
Object |
getConnectionProperty(String prop)
|
String |
getDatabaseName()
|
String |
getDataSourceName()
|
Debug |
getDebug()
Returns a Debug object for this driver. |
String |
getDescription()
|
String |
getNetworkProtocol()
|
String |
getPassword()
|
int |
getPortNumber()
|
String |
getResourceManagerName()
|
int |
getResourceManagerType()
|
String |
getServerName()
|
SybMessageHandler |
getSybMessageHandler()
Returns the current message handler object for this driver. |
String |
getUser()
|
void |
setConnectionProperties(Properties props)
Provided as a replacement for being able to call Driver.getConnection(url, props). |
void |
setDatabaseName(String newDatabaseName)
|
void |
setDataSourceName(String newDataSourceName)
|
void |
setDescription(String newDescription)
|
void |
setNetworkProtocol(String newProtocol)
|
void |
setPassword(String newPassword)
|
void |
setPortNumber(int newPortNumber)
|
void |
setRemotePassword(String serverName,
String password,
Properties props)
Set the remote password in the given Properties object. |
void |
setResourceManagerName(String newRMName)
This logical name corresponds to the xa_open call from the XA Specification. |
void |
setResourceManagerType(int type)
Inform this datasource that if XAConnections are to be created, that this type of resource manager should be expected. This method is only necessary when the manager is an XA Server 11, and should then be called as
setResourceManagerType(SybDataSource.RMTYPE_XA_11)
|
void |
setServerName(String newServerName)
|
void |
setSybMessageHandler(SybMessageHandler msgHandler)
Sets the message handler for this driver. |
void |
setUser(String newUser)
|
void |
setVersion(int version)
Configures the driver for the desired behavior. |
Field Detail |
public static final String DATABASE_NAME
getDatabaseName()
and
setDatabaseName(String)
.
This represents the name of the database to connect to.public static final String DATA_SOURCE_NAME
getDataSourceName()
and
setDataSourceName(String)
.public static final String DESCRIPTION
getDescription()
and
setDescription(String)
.public static final String NETWORK_PROTOCOL
getNetworkProtocol()
and
setNetworkProtocol(String)
.public static final String PASSWORD
getPassword()
and
setPassword(String)
.
This represents the password for the user to use
during login if getConnection() is called.public static final String PORT_NUMBER
getPortNumber()
and
setPortNumber(int)
.
This represents the port number that the
server is listening on.public static final String SERVER_NAME
getServerName()
and
setServerName(String)
.
This represents the name of the server (machine)
to connect to.public static final String USER
getUser()
and
setUser(String)
.
This represents the name of the user to use
during login if getConnection() is called.public static final String CONNECTION_PROPERTY
getConnectionProperty(String)
and
setConnectionProperties(Properties)
.
These methods allow users to specify the properties that
were historically specified in the JDBC URL or in the
Properties object that was passed into DriverManager.getConnection
Method Detail |
public void setVersion(int version) throws SQLException
This method can be called multiple times with different version values. Connections inherit the behavior associated with the version at the time the connection is made. Subsequent changes to the version in the driver have no effect on existing connections.
version
- one of the SybDriver.VERSION
valuesVERSION_2
,
VERSION_3
,
VERSION_4
,
VERSION_LATEST
public void setSybMessageHandler(SybMessageHandler msgHandler)
msgHandler
- message handler to be called when an error
occurs or null to turn off error callbackspublic SybMessageHandler getSybMessageHandler()
public Debug getDebug()
public void setRemotePassword(String serverName, String password, Properties props)
This method can be used repeatedly to add servername/password combinations to the Properties object you provide. This Properties argument can then be used with the SybDataSource.setConnectionProperties(props) method.
serverName
- name of the remote serverpassword
- password at the remote serverprops
- the Properties in which to store the server/passwordpublic DynamicClassLoader getClassLoader(String url, Properties props)
url
- the db url used by the class loader to load classesprops
- the connection properties used by the loader to
connect to the database containing the classes.public String getServerName()
public void setServerName(String newServerName)
public String getDatabaseName()
public void setDatabaseName(String newDatabaseName)
public String getDataSourceName()
public void setDataSourceName(String newDataSourceName)
public String getDescription()
public void setDescription(String newDescription)
public String getUser()
public void setUser(String newUser)
public String getPassword()
public void setPassword(String newPassword)
public String getNetworkProtocol()
public void setNetworkProtocol(String newProtocol)
public int getPortNumber()
public void setPortNumber(int newPortNumber)
public Object getConnectionProperty(String prop)
prop
- a jConnect property namepublic void setConnectionProperties(Properties props) throws SQLException
props
- the jConnect properties the
user wants for the connectionpublic void setResourceManagerName(String newRMName)
If this object is an XADataSouce, then this string will be used for all XAConnections (and their corresponding XAResources) that are created from this data source. When this value is changed, subsequent XAConnections will use the new name.
newRMName
- the non-null String name to give
the resource manager.public String getResourceManagerName()
public void setResourceManagerType(int type)
This method is only necessary when the manager
is an XA Server 11, and should then be called
as
setResourceManagerType(SybDataSource.RMTYPE_XA_11)
type
- indicates what type of manager
from the available values on this interface:
RMTYPE_*public int getResourceManagerType()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |