Oracle JDeveloper includes bundled integration with the Apache Ant build system. These integrations provide convenient mechanisms for the invocation of custom Ant tasks such as those provided by the Harvester.
The following sections describe how to configure Oracle JDeveloper to invoke the Harvester from within the developement environment with the corresponding examples:
To configure Oracle JDeveloper to support the integration with Oracle Enterprise Repository, perform the following steps:
Navigate to the BEA_HOME\repository103\core\tools\solutions directory and unzip the OER103-SOA-BPM-Harvester.zip file to the Oracle JDeveloper directory. For example, if the jdeveloper.exe file is located in C:\oracle\soa, ensure that the introspector directory is unzipped into that directory, as shown in Figure 3-1.
Figure 3-1 Sample Directory Structure
Navigate to the <jdeveloper_home>\harvester directory and right-click the tools.xml file to open in a text editor.
Copy all the elements between the <tools> and </tools> elements and paste the copied elements into the tools.xml file in the <jdeveloper_home>\jdev\system\oracle.jdeveloper.10.1.xxxxx directory.
Save the tools.xml file in the <jdeveloper_home>\jdev\system\oracle.jdeveloper.10.1.xxxxx directory.
Set Repository Connection Information for JDeveloper
To set repository connection information for Oracle JDeveloper, perform the following steps:
Launch Oracle JDeveloper and choose Tools, External Tools. The External Tools dialog is displayed, as shown in Figure 3-2.
Figure 3-2 External Tools Dialog
Select Submit this file to Oracle Enterprise Repository and click Edit. The Edit External Tool dialog is displayed.
In the Properties tab, edit registry.url, registry.username, and registry.password properties to set the Oracle Enterprise Repository URL, username, and password.
To point to an external HarvesterSettings.xml file, add a property called "settings.file" and set the value to the URL of the settings file, for example, c:\temp\MyHarvesterSettings.xml.
Select an item in the External Tools dialog and click OK to submit.
Repeat step 2 to step 5 for the Submit this project to Oracle Enterprise Repository external tool.
Note:
The steps mentioned in the section are common to both Oracle JDeveloper 10g.
Select the Artifacts to Harvest for Oracle JDeveloper
After you configure Oracle JDeveloper to integrate with the Harvester and specify the correct repository connection information, you can harvest the artifacts in both Oracle JDeveloper 10g. Perform the following steps to harvest artifacts from Oracle JDeveloper:
Select a file in the Application Navigator.
Right-click the file and choose either of the following options:
Submit this file to Oracle Enterprise Repository - This option will harvest just the selected file. This works for zips and jars too.
Submit this project to Oracle Enterprise Repository - This option, as displayed in Figure 3-3, will harvest the entire project containing the selected file.
Note:
Using this option, you can only submit one project at a time from JDeveloper, but you can not submit the complete application.
Figure 3-3 Submitting a JDeveloper Project to Oracle Enterprise Repository
In Oracle JDeveloper, you can also right-click an XSL, WSDL, XSD, or .zip file and choose Submit this file to Oracle Enterprise Repository from the context menu.
Note:
The right-click option is not available for BPEL files in the Applications Navigator, but if you open the BPEL file and click the Source tab, you can submit the file to the Oracle Enterprise Repository.
Configuring Eclipse
The Harvester integrates the Oracle SOA Suite artifacts to Oracle Enterprise Repository to support the visibility, impact analysis, and reusability use cases. This section describes the various steps involved in configuring Eclipse to support integration with Oracle Enterprise Repository:
Setting up Eclipse Environment to use Harvester as an “External Program”
In Eclipse, click Run, External Tools. The External Tools dialog is displayed.
Right-click Program, and then select New.
Enter the following details in the External Tools dialog, as shown in Figure 3-4.
In the Name field, type Submit this project to Oracle Enterprise Repository.
In the Location field, type <Harvester Home>\introspector\introspect.bat. You can also browse the introspect.bat file using the Browse button.
In the Working Directory field, type <Harvester Home>\introspector. You can also browse the introspect.bat file using the Browse button.
In the Arguments field, type -dir ${project_loc}.
Figure 3-4 External Tool Dialog
Click the Common tab.
In the Display in favorites menu pane, enable External Tools, as shown in Figure 3-5.
Figure 3-5 External Tools Dialog - Common Tab
Harvesting in Eclipse Environment using “External Program”
In Eclipse, click New, Project, General, Project to create a new eclipse project.
Browse for any WSDL file in the file system, copy it and paste into the just created project.
Select the project and then click Submit this project to Oracle Enterprise Repository. This invokes the Harvester and submits all the artifacts in the project, as shown in .
Figure 3-6 Java EE - Eclipse Platform
Repeat the above steps to create another program called Submit this file to Oracle Enterprise Repository by using – dir ${resource_loc} instead of the ${project_loc} variable and to submit the individual files.
Setting up Eclipse Environment to use Harvester via ANT
Copy the Harvester directory to any project in the Eclipse workspace.
In the Eclipse workspace, click Window, Preferences. The Preferences dialog is displayed.
Select Ant, Runtime. The Runtime page is displayed.
Select Global Entries and then click Add Folder. The Browse for Folder dialog is displayed.
Select the introspector and click OK.
In the Eclipse workspace, click Window, Show View, Other, and then Ant. The Ant view is displayed.
Right-click the ANT view window and select Add Build Files option. The Buildfile Selection dialog is displayed.
Select introspector-ant.xml from the Harvester directory, as shown in Figure 3-7.
Figure 3-7 BuildFile Selection Dialog
In the ANT window, expand the introspector node and right-click introspect-file and select Run As, Ant Build, as shown in Figure 3-8. The External Tools dialog is displayed.
Figure 3-8 The ANT Window
Enter the following details in the External Tools dialog:
Name: Submit this file to Oracle Enterprise Repository using ANT.
Click the Classpath tab and select User Entries.
Click Add External JARs and select all the jars under <Harvester Home>\introspector and <Harvester Home>\introspector\lib directories.
Click the Common tab. In the Display in favorites menu pane, enable External Tools.
Click the Properties tab and uncheck the Use global properties as specified in the Ant runtime preferences option.
Click the Add Property button and add the following properties as shown below:
file.path = ${resource_loc}
repository.url = http://localhost:7101/oer/
repository.username = admin
repository.password = admin
After the configuration of the Properties tab, the External Tools dialog is displayed, as shown in Figure 3-9.
Figure 3-9 External Tools Dialog - Properties Tab
Harvesting in Eclipse Environment using ANT
In Eclipse, click New, Project, General, Project to create a new eclipse project.
Browse for any WSDL file in the file system, copy and paste it into the project that you just created.
Select the project and then click Submit this file to Oracle Enterprise Repository using ANT. This invokes Harvester and submits all the artifacts in the project, as shown in Figure 3-10.
Figure 3-10 The Console Window
Configure the Oracle Enterprise Repository Plug-ins
This section describes the steps to configure the Oracle Enterprise Repository Plug-ins for repository access and the prerequisities to enable this configuration. This section contains the following topics:
Configuring the Oracle Enterprise Repository Plug-ins for Repository Access in Workshop for WebLogic
For instructions on installing the Oracle Enterprise Repository plug-ins for repository access within the Eclipse-based Oracle Workshop for WebLogic IDE, see Oracle Enterprise Repository Installation Guide.
Uninstalling the Oracle Enterprise Repository Plug-ins
When uninstalling the Oracle Enterprise Repository plug-ins, Oracle Workshop for WebLogic will also be removed if it was installed by the Oracle Enterprise Repository installer. This may not be desirable if other plug-ins were since added to Oracle Workshop for WebLogic. To avoid uninstalling additional Oracle Workshop for WebLogic plug-ins, deselect the Oracle Enterprise Repository plug-ins for Eclipse option from the list of components to uninstall.
Installing Products After Installing Oracle Enterprise Repository
If Oracle Service Bus applications are installed after the Oracle Enterprise Repository plug-in is installed, then Eclipse must be launched using the -clean flag.
Prerequisites for Using the Oracle Enterprise Repository Plug-ins with Workshop for WebLogic
You should complete the prerequisites described in this section before using the Oracle Enterprise Repository plug-ins for Oracle Workshop for WebLogic.
In order to be able to submit Oracle Service Bus projects as assembly models to the repository, you must first import the Eclipse Solution Pack that is bundled with your installation into Oracle Enterprise Repository.
Navigate to the BEA_HOME\repository103\core\tools\solutions folder.
Select the OER103-Eclipse-Solution-Pack.zip as the target file to import into Oracle Enterprise Repository.
Click Next, and then click Next again to start the import process.
Click Finish to complete the process.
After importing the Eclipse Solution Pack, you must reestablish connectivity to the Oracle Enterprise Repository plug-ins by using the Eclipse Preferences page, as described in
“Configuring the Oracle Enterprise Repository Connection” on page 5-2.
Once connectivity is established, then the Oracle Enterprise Repository plug-in imports all the necessary asset types, taxonomy, relationships, and other entities for application integration to Oracle Enterprise Repository. Once these entities are imported, they will be available whenever you connect the Oracle Enterprise Repository plug-in to the enterprise repository.
Assign Users to an Oracle Enterprise Repository Project
In order to download assets from the repository, users must be assigned to at least one Oracle Enterprise Repository project. An Oracle Enterprise Repository project administrator can assign users to projects using the Oracle Enterprise Repository Projects page.
Obtain the Eclipse integration path from the Oracle Enterprise Repository administrator. (For example, http://appserver.example.com/aler-web/eclipse).
Enabling the Assets-in-Progress Properties
Two system settings must be enabled in order to activate Assets-in-Progress when using Oracle Workshop for WebLogic with Oracle Enterprise Repository.
This procedure is performed on the Oracle Enterprise Repository Admin screen.
Click System Settings.
Click General Settings in the System Settings section.
Enter the property cmee.asset.in-progress in the Enable New System Setting box and click Enable to reveal this hidden property.
Make sure the Asset in Progress property is set to True.
Click Save.
Enter the property cmee.asset.in-progress.visible in the Enable New System Setting box and click Enable to reveal this hidden property.
Make sure the Asset in Progress property is set to True.
Click Save.
The Registration Status drop-down menu will now appear in the Search section on the AquaLogic Enterprise Repository Assets screen. For more information about Assets-in-Progress, see Oracle Enterprise Repository Registrar Guide.
Enabling Assembly Model Submission Properties
In order to be able to submit Oracle Service Bus projects as assembly models to the repository, this capability must be enabled in the Oracle Enterprise Repository System Settings. You can also enable the logging of asset submissions from external endpoints.
Click System Settings in the sidebar on the Oracle Enterprise Repository Admin page.
Enter the property cmee.tooling.submission.enabled in the Enable New System Setting box and click Enable to reveal this hidden property.
Set the Asset Submission from Integrated Endpoint property to True to enable asset submissions generated through integrations with external endpoints.
Click Save.
Enter the property cmee.tooling.submission.logging in the Enable New System Setting box and click Enable to reveal this hidden property.
Set the Submission Logging of Integrated Endpoint property to True to enable the logging of import/export jobs controlling asset submissions through integrations with external endpoints.
If Oracle Enterprise Repository is or will be configured to be secured by Siteminder, the policy server must be configured to ignore (or unprotect) the following URL:
http://appserver.example.com/aler-web/eclipse/
Java JDK
The Java Cryptography Extension (JCE) is required. It is provided in JDK v1.4, and is available as an optional package in JDK 1.2.x through 1.5.x. Note that Oracle Enterprise Repository plug-ins for use with Eclipse 3.x require JDK v 1.5.x or later.
XML Parsing
Since Editor and Viewer metadata is represented as CDATA-escaped XML, some XML parsers may exceed their entity expansion limit when communicating with Oracle Enterprise Repository. For example, if you have defined a large number of Asset Types in Oracle Enterprise Repository, then you may need to increase the Entity Expansion Limit of your XML parser.
On some popular parsers, the default entity expansion limit is set to 64,000. This limit can be increased on JAXP-compliant processors by passing a command-line parameter called entityExpansionLimit. The entityExpansionLimit can be increased by passing a VM argument on the Eclipse command-line (modify the Eclipse desktop shortcut). For example, set the target of the shortcut to the following:
Configure the Oracle Enterprise Repository Preferences
This section describes the steps to configure the Oracle Enterprise Repository connection.
When you invoke an action on a repository, such as querying or publishing assets, before repository connectivity has been established, then the Connect to Enterprise Repository wizard will either be automatically displayed (in the case of querying the repository), or will be launched by an explicit user gesture.
Note:
If credential information had been specified in a previous session, the wizard will display this persisted information when it is launched.
In the Credentials area, enter the server location and login credentials, as follows:
Repository URL: the URL of the repository server. The URL must include the host, port, and Oracle Enterprise Repository server name. For example, http://localhost:7001/oer.
User Name: user name to gain access to the repository.
Password: password to gain access to the repository.
Click the Establish Connection button to ensure enterprise repository connectivity.
If a connection cannot be established, an appropriate error message will be displayed.
Once connectivity is established, you can either:
Click Finish to exit.
Click Next to select your workspace preferences (skip to Step 4).
Figure 3-12 Specify Workspace Preferences
Once connectivity is established, you can specify your workspace preferences:
Enter a Model Namespace to use as a default for your all of your projects. The Namespace provides a means to organize your models, with the Namespace pre-pended to the names of all the assets in the model in the repository. However, you can change the Namespace on a project-by-project basis (such as when submitting assets), and the new Namespace will only be saved for that project, but will not affect the Workspace Preference name.
Select a Repository project in Oracle Enterprise Repository that the submitted model will be associated with. Asset usage is tracked in the repository and attributed to repository projects, which typically represent software development programs, business initiatives, etc.
Enable usage detection: If you selected an Oracle Enterprise Repository project as the workspace default, usage detection will be enabled for the default Oracle Enterprise Repository project. For more information about workspace preferences, see
Chapter 5, “Setting Eclipse Preferences for Oracle Enterprise Repository.”
The Artifact Store area displays the name of a preconfigured Artifact Store that the submitted assets will be associated with. Artifact Stores are Oracle Enterprise Repository’s representation of Software Configuration Management (SCM) systems. SCMs contain the master artifacts, which are referenced by URLs in Artifact Assets and in asset FileInfos. Only those Artifact Stores that have been defined by an Oracle Enterprise Repository administrator will appear in the Name list. If an SCM does not appear in the Name list, an administrator must add it to the Oracle Enterprise Repository instance. The Details box may also display some additional information about the Artifact Store.
Click Finish to exit.
Enable Automatic Usage Detection
Oracle Enterprise Repository can automatically detect asset reuse within the development environment. This allows development teams to ensure that they get asset reuse credit, regardless of whether the assets have been downloaded through Oracle Enterprise Repository or pulled from another source, such as the developer’s desktop. Automated Usage Detection relies on a fingerprinting process, called Software File Identification (SFID), which tags selected files within an asset with a unique ID. This SFID is then used to detect when and where an asset is used, even if the asset was acquired through means other than the Oracle Enterprise Repository Use - Download process. An instance of usage is recorded by Oracle Enterprise Repository when tagged files within the asset are brought into the developer's IDE, and a new build or build clean occurs.
Automated Usage Detection requires the installation of the Oracle Enterprise Repository Plug-in for Oracle Workshop for WebLogic, and is currently compatible only with Eclipse and Eclipse-based IDEs.
Enter the appropriate information in the File Pattern text boxes:
Include File Pattern – Includes indicated file pattern
Exclude File Pattern – Excludes the indicated file pattern
Specify which project directories will be targets for automatic usage detection by using the individual check boxes or by using the Select All and/or Unselect All buttons.
Click OK when finished.
Configuring VS .NET
Oracle Enterprise Repository integration with Visual Studio .NET provides users with the ability to easily search for and use assets from the repository without leaving the VS .NET IDE environment. Assets and any associated artifacts are downloaded directly to your VS .NET solution. Repository Access within the VS .NET solution also provides a view into Oracle Enterprise Repository that enables you to download artifacts and assets from the repository, query the repository, and view the contents of the repository.
In Microsoft Visual Studio, click Tools, External Tools. The External Tools dialog is displayed.
Click Add. A entry is added to the Menu Contents pane.
Enter the following details in the External Tools dialog, as shown in Figure 3-4.
In the Title field, type OER - Harvest.
In the Comman field, click the Browse button at the end of the field and select the introspect.bat file in the introspector directory.
In the Arguments field, type the -dir parameter. Click the right-arrow at the end of this field and select ItemPath from the menu.
In the Initial Directory field, type the location of the introspector directory.
Select the Use Output Window option. This option enables you to monitor progress.
Figure 3-14 External Tool Dialog
Click OK.
Select the WSDL file in the Microsoft Visual Studio and click Tools, OER - Harvest. The Output window is displayed with the Shutdown and Clean up messages indicating that the introspection is complete.
Open the Oracle Enterprise Repository home page with your username/password credentials.
In Assets pane, enter the name of the WSDL as the search criteria in the Enter Search String field, and then click Search. The search results are displayed in the right pane.
Select the service in the search results section, the details of the service are displayed in the bottom pane.
Click the Navigator button to view the relationships.
In the Oracle Enterprise Repository main page, click Admin, and then System Settings. The System Settings page is displayed.
Enter Show in the Search field, and set the Show System-Supplied Relationships option to True.
Click Save at the bottom of the page.
In the Oracle Enterprise Repository main page, click Assets and repeat the same search that you performed in step 7. The automatic relationships that were not imported earlier are now imported.
Configure the Oracle Enterprise Repository Plug-ins
Oracle Enterprise Repository can automatically detect asset reuse within the development environment. This allows development teams to ensure that they get asset reuse credit, regardless of whether the assets have been downloaded through Oracle Enterprise Repository. For more information, see Enable Automatic Usage Detection
Prerequisities
Microsoft Visual Studio 2008.
Microsoft Visual J# 2005 runtime. (If J# is not installed on your machine, the installer will prompt you download the correct version from Microsoft.)
The VS .NET Always show solution option should be selected (Tools -> Options -> Projects and Solutions -> General).
Users must be assigned to at least one Oracle Enterprise Repository project. A Project Administrator can assign users to projects using the Oracle Enterprise Repository Projects page.
If your Oracle Enterprise Repository is or will be secured by Siteminder, you will need to configure the policy server to ignore (or unprotect) the following URL to allow the OpenAPI integration to function properly:
http://appserver.example.com/OER/services/
Installation
Download the VS .NET plug-in Zip file from your Oracle Enterprise Repository instance at the following URL:
Configure the Connection to Oracle Enterprise Repository
Follow these steps to configure and establish a connection to an Oracle Enterprise Repository instance from VS. NET.
Launch Visual Studio .NET.
Open the Tools menu and click Options.
On the list of options, click the OER Add-in for Visual Studio .NET option, as shown in Figure 3-16, and provide the required login information.
Figure 3-16 The Options dialog
Oracle Enterprise Repository URL
The URL of the Oracle Enterprise Repository instance. For example: http://appserver.example.com/OER
Note:
Do not include the index.jsp used in the default home page as part of the URL.
User Name: The user name to connect as.
User Password: The password to connect with. Passwords are case-sensitive.
Establish Connection: Click to verify a valid connection.
Automatically register downloaded Asset files: If selected, downloaded asset files are registered with the Windows Registry, as appropriate. This may be overridden on an case-by-case basis for each asset download.
Click the Establish Connection button to connect to the Oracle Enterprise Repository instance you specified.
Optionally, click the Advanced button to enable additional Oracle Enterprise Repository options:
Usage detection for VS .NET Solution Projects
Automated usage detection of referenced DLLs, WSDLs, and allow local caching of SFIDs (if SFID is enabled at your installation)
File name patterns to include and exclude
Click OK when finished.
Assign an Oracle Enterprise Repository Project to a .NET Solution
In order to track the usage of downloaded assets, an Oracle Enterprise Repository project must be assigned to a .NET solution.
Note:
Before using this feature, you must be assigned to at least one Oracle Enterprise Repository Project by a Project Administrator.
Open the .NET Solution Explorer.
Right-click a solution in the file tree and select the Oracle Enterprise Repository Add-in for Visual Studio .NET option from the context menu.
Click Assign Oracle Enterprise Repository Project from the submenu, as shown in Figure 3-17.
Figure 3-17 The Solution Explorer Window
In the Project Selection window, use the Select the Oracle Enterprise Repository Project drop-down list to view the Oracle Enterprise Repository projects that you are assigned to, as shown in Figure 3-18.
If the list is empty, you have not been assigned to any projects and the procedure must be canceled.
Select an Oracle Enterprise Repository project from the list.
Click Finish to save your changes.
Enable Automatic Usage Detection
Follow these steps to enable advanced configuration options, such as enabling automatic usage detection of DLLs, WSDLs, local caching of SFIDs, and file pattern detection.
Overview of SFID
If SFID is enabled at your installation, Oracle Enterprise Repository can automatically detect asset reuse within the development environment. This allows development teams to ensure that they get asset reuse credit, regardless of whether the assets have been downloaded through Oracle Enterprise Repository. Automated Usage Detection relies on a fingerprinting process, called Software File Identification (SFID), which tags selected files within an asset with a unique ID. This SFID is then used to detect when and where an asset is used, even if the asset was acquired through means other than the Oracle Enterprise Repository Use - Download process. An instance of usage is recorded by Oracle Enterprise Repository when tagged files within the asset are brought into the developer's IDE, and a new build or build clean occurs.
Configuring Automatic Usage Detection
Launch Visual Studio .NET.
Open the Tools menu and click Options.
On the list of options, click Oracle Enterprise Repository Add-in for Visual Studio .NET to reopen the Login window.
Click the Advanced Options button to open the Advanced Settings window. Use the Detect Usage tab to enable usage detection for VS .NET Solution Projects, as shown in Figure 3-19.
Figure 3-19 The Advanced Settings Dialog - Detect Usage Tab
Click the Automated Usage Detection tab to enable usage detection of referenced DLLs, WSDLs, and allow local caching of SFIDs, as shown in Figure 3-20.