此内容没有您所选择的语言版本。
Chapter 7. Connect to a Local Red Hat JBoss Data Virtualization Server
With this example, you will learn how to connect to a Red Hat JBoss Data Virtualization server. A default server is defined within the VDBBuilder CLI. You can specify the server connection properties, then connect to and interact with the server. The sample session below shows how to connect to the server and view the deployed data sources.
Note that once you are connected to a server, many more server commands will become available to you. You can discover the available server commands in VDBBuilder by typing 'help' after connecting to the server.
VDBBuilder will attempt to connect to the server on startup if the global property SERVER_CONNECT_ON_STARTUP is set to true.
Figure 7.1. Code sample
Explanation of the Commands Used in this Example:
- show-status
- display the workspace status. (Note the current server status is Not Connected.)
- server-show-properties
- shows the default server properties. You can use 'server-set-property' to change the properties.
- server-connect
- connects to the default server.
- show-status
- display the status again. This time, note the server status is [Connected]
- help
- shows the available commands. (Note the server commands that are now available.)
- server-datasources
- display the datasources currently deployed on the connected server.
- server-disconnect
- disconnects from the default server.