This appendix describes the wsadmin commands you can use to deploy, manage, and configure Oracle ADF applications to IBM WebSphere Application Server.
This chapter includes the following sections:
Use the ADF-based URL Connections wsadmin commands to navigate the hierarchy of configuration or runtime beans and control the prompt display. Use the getADFMArchiveConfig commands to manage the ADFMArchiveConfig object.
Each command must be qualified by the module name. For example, if the module is URLConnection.py, then the command can be invoked like this: URLConnection.createFileUrlConnection. An example for the module ADFAdmin.py would be ADFAdmin.getADFArchiveConfig.
Use the commands in Table B-1 to manage ADF applications. Invocation of wsadmin commands need to include the module name where the method is defined. For example, URLConnection.createFileURLConnection('myapp', 'tempDir', '/scratch/tmp').
Table B-1 Browse Commands for wsadmin Configuration
| Use this command... | To... | Use with WLST... |
|---|---|---|
|
|
Create a new ADF file connection. |
Online or Offline |
|
|
Create a new ADF URL connection. |
Online or Offline |
|
|
Set or edit the attributes of a newly created or existing ADF connection. |
Online or Offline |
|
|
List a new URL connection. |
Online or Offline |
|
|
Returns a handle to the |
Online or Offline |
|
|
add Batik SVG jars to ADF View JRF. |
Online |
Use with wsadmin: Online or Offline.
Use this command to creates a new connection based on the oracle.adf.model.connection.url.FileURLConnection connection class.
URLConnection.createFileURLConnection(appName, name, URL)
| Argument | Definition |
|---|---|
appName |
Application name for which the connection will be created. |
name |
The name of the new connection. |
URL |
The URL associated with this connection. |
Use with wsadmin: Online or Offline.
Use this command to create a new connection based on the oracle.adf.model.connection.url.HttpURLConnection connection type class.
URLConnection.createHttpURLConnection (appName, name, [URL], [authenticationType], [realm], [user], [password])
| Argument | Definition |
|---|---|
appName
|
Application name for which the connection will be created. |
name
|
The name of the new connection. |
url
|
(Optional) The URL associated with this connection. |
|
|
(Optional) The default is basic. |
|
|
(Optional) If this connection deals with authentication, then this should be set. The default is basic. |
|
|
(Optional) |
|
|
(Optional) |
Use with wsadmin: Online or Offline.
Use this command to set or edit the attributes of a newly created or existing ADF connection.
URLConnection.setURLConnectionAttributes(appname, connectionname, attributes)
| Argument | Definition |
|---|---|
appname |
Application name. |
connectionname |
The name of the connection. |
attributes
|
The array containing attributes to set in key/value pairs. |
Use with wsadmin: Online or Offline.
URLConnection.listURLConnection(appname)
| Argument | Definition |
|---|---|
appname |
Application name. |
Use with wsadmin: Online or Offline.
Returns a handle to the ADFMArchiveConfig object for the specified archive. The returned ADFMArchiveConfig object's methods can be used to change application configuration in an archive.
The ADFMArchiveConfig object provides the following methods:
setDatabaseJboSQLBuilder([value]) - Sets the Database jbo.SQLBuilder attribute.
getDatabaseJboSQLBuilder() - Returns the current value of the jbo.SQLBuilder attribute.
setDatabaseJboSQLBuilderClass([value]) - Sets the Database jbo.SQLBuilderClass attribute.
getDatabaseJboSQLBuilderClass() - Returns the current value of the jbo.SQLBuilderClass attribute.
setDefaultRowLimit([value]) - Sets the defaults rowLimit attribute. Value is a long specifying the row limit (Default -1).
getDefaultRowLimit() - Returns the current value of the rowLimit attribute.
save([toLocation]) - If you specify the toLocation, then the changes will be stored in the target archive file and the original file will remain unchanged. Otherwise, the changes will be saved in the original file itself.
archiveConfigObject = ADFMAdmin.getADFMArchiveConfig(fromLocation)
| Argument | Definition |
|---|---|
fromLocation
|
The name of the ear file, including its complete path. |
The syntax for setDatabaseJboSQLBuilder([value]) is:
archiveConfigObject.setDatabaseJboSQLBuilder([value])
| Argument | Definition |
|---|---|
value
|
The value of the |
The syntax for getDatabaseJboSQLBuilder() is:
archiveConfigObject.getDatabaseJboSQLBuilder()
The syntax for setDatabaseJboSQLBuilderClass([value]) is:
archiveConfigObject.setDatabaseJboSQLBuilderClass([value])
| Argument | Definition |
|---|---|
value
|
The value of the |
The syntax for getDatabaseJboSQLBuilderClass() is:
archiveConfigObject.getDatabaseJboSQLBuilderClass()
The syntax for setDefaultRowLimit([value])is:
archiveConfigObject.setDefaultRowLimit([value])
| Argument | Definition |
|---|---|
value
|
The value of the |
The syntax for getDefaultRowLimit() is:
archiveConfigObject.getDefaultRowLimit([value])
The syntax for save([toLocation]) is:
archiveConfigObject.save([toLocation])
| Argument | Definition |
|---|---|
toLocation
|
The file name along with the absolute path to store the changes. |
In the following example, if the adf-config.xml file in the archive does not have the application and shared metadata repositories defined, then you should provide the complete connection information.
# Open something.ear and return an object which can be used
# manipulate it
archive = ADFMAdmin.getADFMArchiveConfig('/path/to/something.ear')
# Return current JBO SQL Builder value
archive.getDatabaseJboSQLBuilder()
# Change JBO SQL Builder value to Oracle
archive.setDatabaseJboSQLBuilder('Oracle')
# Save the changes back to the original file
archive.save()
archive = ADFMAdmin.getADFMArchiveConfig('/path/to/something.ear')
archive.getDatabaseJboSQLBuilder()
In the following example. the jbo.SQLBuilder attribute is set to 'DB2'.
wsadmin> archive =
ADFMAdmin.getADFMArchiveConfig(fromLocation='/tmp/testArchive.ear')
wsadmin> archive.setDatabaseJboSQLBuilder(value='DB2')
wsadmin> archive.save()
In the following example, the jbo.SQLBuilder attribute is removed so that application default is used.
wsadmin> archive =
ADFMAdmin.getADFMArchiveConfig(fromLocation='/tmp/testArchive.ear')
wsadmin> archive.setDatabaseJboSQLBuilder()
wsadmin> archive.save(toLocation='/tmp/targetArchive.ear')
In the following example, the jbo.SQLBuilder attribute is set to 'Custom', and the jbo.SQLBuilderClass attribute is set to the class 'com.example.CustomBuilder'.
wsadmin> archive =
ADFMAdmin.getADFMArchiveConfig(fromLocation='/tmp/testArchive.ear')
wsadmin> archive.setDatabaseJboSQLBuilder('Custom')
wsadmin> archive.setDatabaseJboSQLBuilderClass('com.example.CustomBuilder')
wsadmin> archive.save(toLocation='/tmp/targetArchive.ear')
In the following example, the rowLimit attribute is set to 100.
wsadmin:/offline> archive = getADFMArchiveConfig(fromLocation='/tmp/testArchive.ear') wsadmin:/offline> archive.setDefaultRowLimit(100) wsadmin:/offline> archive.save(toLocation='/tmp/targetArchive.ear')
Use with wsadmin: Online.
Use this command to add the Batik SVG libraries to the ADF View JRF classpath and the Apache JARs to the application classpath The Batik libraries are required to provide printer-friendly renderings of certain DVT components such as treemap and sunburst. The Apache JARs are required for remote ADF task flows.
The following Apache JARs will be added to $ORACLE_HOME/modules:
org.apache.http.components.httpclient-4.1.2.jar
org.apache.http.components.httpclient-cache-4.1.2.jar
org.apache.http.components.httpcore-4.1.2.jar
org.apache.http.components.httpmime-4.1.2.jar
ADFAdmin.updateADFLibrary(cellName, nodeName, serverName)
| Argument | Definition |
|---|---|
cellName |
WebSphere Cell name. |
nodeName |
WebSphere Node name. |
serverName |
WebSphere Server name. |