Most, but not all, adapter wizards require a connection page. For example, the AQ adapter requires a database connection page to enable the user to query and display a list of available queues.
If your adapter wizard requires a database connection, add JcaDBConnectionPage
in addInitialWizardPages
and use the method as is. The JDeveloper connection objects will be available to subsequent pages by the following accessor in the AdapterWizardContext
:
Connection getConnection();
DatabaseConnectionInfo getDBConnectionInfo();
The Custom Adapter in this guide is an example of an adapter that has its own connection type and does not use the JcaDBConnectionPage
.
In this case, the CustomConnectionPage
prompts for the connection-factory location and puts this information into the data model with code similar to:
JcaDataInterface jdata = (JcaDataInterface)getDataModel(); jdata.setConnectionFactoryAtrribute(JcaDataInterface. CONNECTION_FACTORY _LOCATION_ATTRIBUTE,connectionTextField.getText().trim());