Oracle® Application Server Integration InterConnect Adapter for DB Installation and User's Guide
10g Release 2 (10.1.2) Part No. B14076-01 |
|
![]() Previous |
![]() Next |
This chapter provides answers to frequently asked questions about the Database adapter:
What should I enter on the Database User Configuration screen during installation?
Is it possible to edit the database configuration settings created during installation?
Can I install multiple Database adapters on the same computer?
If we manually deploy the PL/SQL code, where is the code, exported through iStudio, saved?
What is the Returned IN Args feature in iStudio and how do I use it?
How do I deploy PL/SQL code to use with the Database adapter?
Why do I get errors when trying to load PL/SQL code generated through iStudio?
What are the steps to prepare a Database adapter that publishes events?
What are the steps to prepare a Database adapter that invokes procedures?
What are the steps to prepare a Database adapter that subscribes to events?
What are the steps to prepare a Database adapter that implements procedures?
What should I enter on the Database User Configuration screen during installation?
This information is used to find where the stored procedures generated through iStudio will be installed for application inbound messages. At runtime, the Database adapter uses this information to call a user-specified stored procedure. This user can be an existing user or a user created specifically for OracleAS Integration InterConnect.
Is it possible to edit the database configuration settings created during installation?
Edit the adapter.ini
file located in the ORACLE_HOME
/integration/interconnect/adapters/[AppType][Partition]
directory.
How can I specify a listener port other than 1521?
Edit the db_bridge_schema
#
_port
parameter.
Can I install multiple Database adapters on the same computer?
Using the Oracle Universal Installer, only one Database adapter can be installed in a single Oracle home. However, copies of the Database adapter using the copyAdapter
script available in the ORACLE_HOME
/integration/interconnect/bin
directory. Usage: copyAdapter dbapp1 dbapp2
The script will create a copy of the already installed Database adapter called dbapp1 with a name of dbapp2.
If we manually deploy the PL/SQL code, where is the code, exported through iStudio, saved?
The PL/SQL code is saved in the ORACLE_HOME
/integration/interconnect/iStudio
directory. iStudio allows any extension to be specified, which is used to prefix the name of every SQL file, generated through iStudio. The following convention is used in naming the SQL files:
PrefixSpecifiedInIStudio
_ApplicationName
_BusinessObjectTYPES
.sqlPrefixSpecifiedInIStudio
_ApplicationName
_BusinessObject
.sql
What is the Returned IN Args feature in iStudio and how do I use it?
Please refer to "Returned In Arguments".
How do I deploy PL/SQL code to use with the Database adapter?
The following steps describe how to deploy PL/SQL code for the Database adapter:
Click the Deploy tab in the iStudio window.
Right-click a Database application and select Deploy PL/SQL. The Deploy PL/SQL - Select Events/Procedures screen is displayed.
Select the application, event or procedure to deploy the corresponding PL/SQL.
Click Next. The Deploy PL/SQL - Database Information screen is displayed. This page allows you to specify the database connection information for deploying the PL/SQL code.
Enter information in the following fields:
Database username: The database user name required for connecting to the database.
Database password: The password required for connecting to the database.
Database URL: The URL of the database required for connecting to the database. The URL should be in the form: host:port:SID
.
Click Next. The Deploy PL/SQL - Summary screen is displayed, which displays a summary of the database connectivity information entered in the previous screen.
The Deploy PL/SQL - Summary screen displays the following:
Database Information
Selected Events/Procedures
This page displays a list of selected packages and the corresponding procedures contained in those packages that you have selected for deployment. The status of each package appears in parenthesis next to the package name.
Click Next. The Deploy PL/SQL - Status screen is displayed.
Click Deploy. The generated PL/SQL is deployed for the selected application, event or procedure.
If you do not want to export all stored procedures, for all applications, as this can take a while, select one or more applications. Only the stored procedures for those applications will be generated. You can also select messages based on the role; for example, if you select publish, then only publish messages will be generated. Or, you can choose to export the stored procedures for specific messages by selecting those messages in the list.
Can database messages contain arrays of arrays?
The database does not allow arrays of arrays. Thus, the application view of database messages should not contain arrays of arrays. For example, the application view of an database message can contain an array of Customers, where each message contains one Address. However, it cannot contain an array of Customers, where each contains an array of Addresses.
When I run start, I do not view anything happening - no log files are created and I don't view any messages in the console - how do I get back to the command prompt?
A start executable that is not the OracleAS Integration InterConnect start
script must be running. This is dependent on what is in the PATH environment variable. Thus, run the start
script as follows:
Platform | Executable |
---|---|
UNIX | ./start
|
Windows | Use the Service Panel. |
Why do I get errors when trying to load PL/SQL code generated through iStudio?
Ensure you none of the PL/SQL reserved keywords are used in OracleAS Integration InterConnect messages. For example, for a Phone object contains the attributes areacode
and number
, a problem would occur because number
is a reserved keyword in PL/SQL.
What are the steps to prepare a Database adapter that publishes events?
Before a Database adapter can publish events, some stored procedures need to be generated in iStudio.
iStudio will create two SQL scripts for a publish message; one with stored procedures and one with types. The types
script name will end with TYPES.sql
. Using any user name, load the types
scripts and the stored procedure script into the database.
When an event occurs, there are several PL/SQL methods that must be called to publish the event message. All of the methods reside in the event business object
package which is created in the stored procedure SQL script. The first procedure that must be called is crMsg
_event name
_event owner
_event version
. It has two out arguments which are both of type number
: the message id and the root data type id.
Next, populate the message with the correct data. For each non-primitive attribute that the message contains, there is a function called cr
_data type name
_attribute name
. This function has one argument for each primitive attribute it contains and it takes the message id and the parent data type id. It returns a number, which is the data type id. When all data types have been created, a procedure must be called to publish the message. This procedure is named pub
_event name
_eventowner
_event version
. This procedure has three arguments: the message id, the source application name, and the destination application name. The destination application name is ignored, so pass in whatever is applicable.
For example, an event in the Customer
business object is called create
. Application A
publishes this event. The application view of this event contains an attribute called C
of type cust
. The cust
type contains a name
attribute, which is a String and a loc
attribute of type Location
. The Location
type contains a city
attribute, which is a String, and a state
attribute, which is also a String. The following piece of code would publish a create
event.
DECLARE moid NUMBER; aoid NUMBER; custid NUMBER; locid NUMBER; BEGIN Customer.crMsg_create_TEST_V1(moid, aoid); custid := Customer.cr_cust_c('Homer', moid, aoid); locid := Customer.cr_Location_loc('Redwood Shores', 'CA', moid, custid); Customer.pub_create_TEST_V1(moid, 'a', ''); END
What are the steps to prepare a Database adapter that invokes procedures?
This is very similar to publishing events. All of the steps are the same until the final procedure call. The name is inv_
proc name
_proc_owner
_proc version
and has three IN arguments: the message id, the source application name, and a timeout. The timeout is how many seconds to wait for a response. The event also has as many OUT arguments as the procedure defined in iStudio has.
What are the steps to prepare a Database adapter that subscribes to events?
Before a Database adapter can subscribe to events, some stored procedures need to be generated in iStudio.
iStudio will create two SQL scripts for a subscribe message: one with stored procedures and one with types. The types script name will end with TYPES.sql
. Under the same user name specified on the Database Configuration page during installation, load the types
scripts and the stored procedure script into the database. A pre-existing user can be specified, but if a user name that does not exist is entered, that user must be created manually.
The DB adapter will call the procedure sub_
event name
_event owner
_event version
in the package eventbusiness object
when a message is received. Add PL/SQL code in this method to perform whatever tasks are necessary when this kind of message is received. This code can be added in iStudio when creating the message, or modify the stored procedure SQL script before loading it into the database.
What are the steps to prepare a Database adapter that implements procedures?
The steps are very similar to subscribing to events. However, the procedure that the Database adapter will call is imp_
procname
_proc owner
_proc version
. This procedure will have OUT arguments corresponding to the OUT arguments in the procedure defined in iStudio. In addition to writing PL/SQL code to perform the necessary tasks, the OUT arguments must be filled in with correct values. Write this code in iStudio when creating the message, or modify the stored procedure SQL script before loading it into the database. If the start
script is used to start the Database adapter, there is a way to determine whether the Database adapter was started properly. This can be viewed in the oailog.txt
file in the logs directory of the Database adapter.
OracleAS Integration InterConnect uses Oracle Wallet Manager to maintain system passwords. When you install OracleAS Integration InterConnect, Oracle Wallet Manager is also installed and a password store is created. All passwords used by OracleAS Integration InterConnect components are stored in the password store. The password is stored in the Oracle Wallet in the following format:
ApplicationName/password
For example,
AQAPP/aq_bridge_schema_password
The ApplicationName
is the name of the application, which is extracted from the adapter.ini
file of the corresponding adapter. In the adapter.ini
file, the application
parameter specifies the ApplicationName
to which this adapter connects. The password for the application is also retrieved from the adapter.ini
file.
You can create, update, and delete passwords using the oraclewallet
command. When you run the command, it prompts you for the admin password.
You can use the following commands to manage your passwords:
List all passwords in the store
oraclewallet -listsecrets
Create a password
oraclewallet -createsecret passwordname
For example, to create a password for the hub schema:
oraclewallet -createsecret hub_password
View a password
oraclewallet -viewsecret passwordname
For example, to view the password for the hub schema:
oraclewallet -viewsecret hub_password
Update a password
oraclewallet -updatesecret passwordname
For example, to update the password for the hub schema:
oraclewallet -updatesecret hub_password
Delete a password
oraclewallet -deletesecret passwordname
For example, to delete the password for the hub schema:
oraclewallet -deletesecret hub_password