Rdb
A relational database service
Overview
Rdb: A relational database service
Intent
An abstract representation of a database server and its dependencies. Often it is desirable to model a database server and expose its resources to referring entities such as an Application Server or other "upstream" deployments. The most common use case is to auto-generate the datasource configurations that an application server (e.g. Tomcat, JBoss, etc) may require for the database application requirements.
Additional support exists for the importing and exporting of dependent database schemas in order to automate the buliding and deploying of versioned data packages.
Discussion
The combination of Rdb and RdbSchema objects can provide a sufficient data model for automated datasource generation. Datasource configurations, which typically require the same information provided by database server(s) and its dependent schema(s), are platform specific (e.g. Tomcat and JBoss both support datasource configurations but are not in common format). It is therefore the requirement of referring objects such as of type JBossServer or TomcatServer to implement the data driven configuration.
Design
- Super Type
- SystemService
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Notification | false |
Template Directory | |
Data View | Children, proximity: 1 |
Logger Name |
Constraints
Allowed Child Dependencies
- RdbConnection 1
- RdbData
- RdbDriver 1
- RdbInstanceName 1
- RdbPassword 1
- RdbPort 1
- RdbSchema 1
- RdbType 1
- RdbUserName 1
1: These types have a Singleton constraint. Only one instance may be added as a resource.
Allowed Parent Dependencies
- JBossServer
- Node
- Site
- TomcatServer
Limit rdb referrers to JBoss and Tomcat servers along with typical site and node objects.
Attributes
Defaults for Imported Attributes
Name | Default | Description |
---|---|---|
rdbConnection | jdbc:hsqldb:hsql://localhost:1701 | the rdbConnection string representing a locally accessible hsql jdbc connection. |
rdbDriver | org.hsqldb.jdbcDriver | set the rdbDriver default to the hsql database driver. |
rdbInstanceName | default | set the default rdbInstanceName to "default" |
rdbPassword | by default, unset the rdbPassword | |
rdbPort | 1701 | set the rdbPort to the default 1701 port. |
rdbType | hsqldb | set the default rdbType to the hsql database server. |
rdbUserName | sa | set the default rdbUserName to "sa" |
Commands
Schemas-ExportDmp
Calls each RdbSchema resource to export its database schema to a dump package
Automates the schema export process useful for a data build from a reference database server.
- Usage
- Schemas-ExportDmp -buildstamp <> [-command <ExportDmp>] [-resourcetype <.*RdbSchema>]
Workflow
- dispatchCmd
Options
Option | Description |
---|---|
buildstamp |
Unique build identifier
identifies the buildstamp for exported schema as a versioned package. |
command |
Command to execute
default command to dispatch to the dependent schema for export. |
resourcetype |
Type of resource to dispatch
regular expression matching dependent schema object when dispatching the export command. |
assertServiceIsUp
checks if the service is up
- Usage
- assertServiceIsUp [-count <3>] [-rdbinstance <${entity.attribute.rdbInstanceName}>] [-rdbpassword <${entity.attribute.rdbPassword}>] [-rdbusername <${entity.attribute.rdbUserName}>]
Options
Option | Description |
---|---|
count | number of times to ping |
rdbinstance | Instance name |
rdbpassword | Database user's password |
rdbusername | Database user name |
Schemas-ImportDmp
Calls each RdbSchema resource to import its dump file package
Automates the schema import of a versioned data packaged.
- Usage
- Schemas-ImportDmp [-command <ImportDmp>] [-resourcetype <.*RdbSchema>]
Workflow
- dispatchCmd
Options
Option | Description |
---|---|
command | Command to execute |
resourcetype | Resource type to dispatch |
Deploy
Runs the Rdb update process
Automates the package download and schema import process.
- Usage
- Deploy
Workflow
- Packages-Install
- Schemas-ImportDmp
Related Types
The following types are defined for use with Rdb.
RdbSetting
Overview
Intent
Supertype to encapsulate related subtypes to support Rdb service.
Design
- Super Type
- Setting
Role | Abstract. (Objects cannot be created.) |
Instance Names | Unique |
Constraints
Limit RdbSetting's referrers to the Rdb service objects.
Allowed Parent Dependencies
RdbDriver
Overview
RdbDriver: Specifies the Database Driver
Intent
Specifies the database driver implementation such as a jdbc class implementation. Typically accessed by a referring application server for datasource generation.
Design
- Super Type
- RdbSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Attributes
Exported Attributes
Name | Property | Description |
---|---|---|
rdbDriver | settingValue | attribute setting containing the database driver implementation. |
RdbConnection
Overview
RdbConnection: Specifies the Database Connection
Intent
Specifies the database connection string, such as a jdbc connection-url. Typically accessed by a referring application server for datasource generation.
Design
- Super Type
- RdbSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Attributes
Exported Attributes
Name | Property | Description |
---|---|---|
rdbConnection | settingValue | attribute setting containing the database connection string. |
RdbPort
Overview
RdbPort: Specifies the Database Connection Port
Optionally exposes the listen port of the database server.
Design
- Super Type
- RdbSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Attributes
Exported Attributes
Name | Property |
---|---|
rdbPort | settingValue |
RdbType
Overview
RdbType: Specifies the unique key value identifying which type database type is in use (e.g. "mssql" or "oracle", etc)
Optionally exposes the type of database implementation.
Design
- Super Type
- RdbSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Attributes
Exported Attributes
Name | Property |
---|---|
rdbType | settingValue |
RdbUserName
Overview
RdbUserName: A user for a schema
Optionally exposes the administrative user of the database server.
Design
- Super Type
- RdbSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Attributes
Exported Attributes
Name | Property |
---|---|
rdbUserName | settingValue |
RdbPassword
Overview
RdbPassword: A schema user's password
Optionally exposes the administrative password of the database server.
Design
- Super Type
- RdbSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Constraints
Attributes
Exported Attributes
Name | Property |
---|---|
rdbPassword | settingValue |
RdbInstanceName
Overview
RdbInstanceName: Stores the value of the database instance name
Optionally exposes the instance name of the database server.
Design
- Super Type
- RdbSetting
Role | Concrete. (Objects can be created.) |
Instance Names | Unique |
Attributes
Exported Attributes
Name | Property |
---|---|
rdbInstanceName | settingValue |