Oracle® Fusion Middleware Integration Guide for Oracle Enterprise Repository 11g Release 1 (11.1.1.4.0) E15754-07 |
|
![]() Previous |
![]() Next |
This chapter describes how to get started with Harvester and its use in various high level use cases.
This section contains the following topics:
To create a connection between the Oracle Enterprise Repository and Oracle JDeveloper 11g Release 1 PatchSets:
Install Oracle JDeveloper on your local computer.
Open Oracle JDeveloper and click Help, Check for Updates. The Check for Updates dialog is displayed.
Click Next. The Source page is displayed, as shown in Figure 9-1.
Figure 9-1 Check for Updates - Source Page
Click Next. The Updates page is displayed.
Enter soa
in the Available Updates box, as shown in Figure 9-2, and search for the update.
Figure 9-2 Check for Updates - Updates Page
Select the SOA JDeveloper Extension update and click Next. The Download page is displayed.
Note: The version of Composite editor may change based on the JDeveloper version you are using. |
Click Next. The Summary page is displayed, as shown in Figure 9-3.
Figure 9-3 Check for Updates - Summary Page
Click Finish.
Restart Oracle JDeveloper. The Oracle JDeveloper window is displayed.
Enter repository
in the Available Updates box, as shown in Figure 9-4, and search for the update.
Figure 9-4 Check for Updates - Updates Page
Select both the Extensions, as shown in Figure 9-4, and click Next. The Download page is displayed.
Note: The versions of Oracle Enterprise Repository Adapter and Oracle Enterprise Repository Harvester Extensions may vary based on the JDeveloper version you are using. |
Click Next. The Summary page is displayed, as shown in Figure 9-5.
Figure 9-5 Check for Updates - Summary Page
Click Finish.
Restart Oracle JDeveloper. The Oracle JDeveloper window is displayed.
Click File, New. The New Gallery dialog is displayed.
Select General, Connections, and then select Oracle Enterprise Repository Connection, as shown in Figure 9-6.
Click OK. The Create Oracle Enterprise Repository Connection dialog is displayed, as shown in Figure 9-7.
Figure 9-7 Create Oracle Enterprise Repository Connection Dialog
Enter the following information:
Repository URL: The URL from where a running instance of Oracle Enterprise Repository can be accessed.
User Name: The user name for the Oracle Enterprise Repository.
Password: The password for the Oracle Enterprise Repository.
Click Test Connection. A success message is displayed in the Status pane.
Click OK.
In the Resource Palette, under IDE Connections, expand Oracle Enterprise Repository to see the application server connection that you created, as shown in Figure 9-8.
Enter a search criteria to search for assets in the Search field. A list of all the assets is displayed, as shown in Figure 9-9.
Note:
|
To install the harvester Ant tasks in JDeveloper 11g or in SOA Suite 11g, perform the following steps:
Double-click jdeveloper.exe in the jdev installation directory to open Oracle JDeveloper.
Note: You should start and close the JDeveloper application at least once during this step. |
Unzip the harvester zip file into your JDeveloper installation. The contents of the zip file are extracted to the <jdeveloper_home>/harvester directory.
Edit the tools11g.xml
file to match your JDeveloper installation.
Merge the contents of tools11g.xml
into your JDeveloper's product preferences XML file located in the <jdeveloper_home>\system11.1.1.x.xx.xx.xx\o.jdeveloper\product-preferences.xml directory.
If there is an existing entry "<hash n = "oracle.ideimpl.externaltools.ExternalToolList">, then replace with the contents in the tools11g.xml file. If not, add it right after the initial <ide:preferences> element.
To configure Oracle JDeveloper to support the integration with Oracle Enterprise Repository, perform the following steps:
Navigate to the Oracle_HOME\repositoryXXX\core\tools\solutions directory and unzip the 11.1.1.x.x-OER-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.
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.
Start Oracle JDeveloper. In JDeveloper window, select Tools, External Tools. The following two options are displayed:
Submit this File into OER
Submit this Project into OER
Select Submit this File into OER and click Edit. The Edit External Tool dialog is displayed.
Click the Properties tab, and configure the missing properties to point to your Oracle Enterprise Repository server.
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.
Repeat Steps 6 to 8 for the Submit this Project into OER option.
In the Applications Navigator, select a file, and right-click and then select Submit this File into OER or Submit this Project into OER.
Note: Oracle JDeveloper 10g does not support multi-select correctly for external tools. Even if you multi-select, only one file is harvested. |
In the Edit External Tool dialog, click the Process tab.
Click Change to change the JDK version to 1.6, and then click OK.
Note: Oracle Enterprise Repository browsing is not supported from Oracle JDeveloper 10g. To make 10g assets as consumable:
Also, the assets that are harvested from JDeveloper 10g or 11g cannot be used for consumption. |
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:
Section 9.2.2, "Configure the Oracle Enterprise Repository Plug-ins"
Section 9.2.3, "Configure the Oracle Enterprise Repository Preferences"
This section describes how to harvest sample artifacts into Oracle Enterprise Repository using Eclipse:
Section 9.2.1.1, "Setting up Eclipse Environment to use Harvester as an "External Program""
Section 9.2.1.2, "Harvesting in Eclipse Environment using "External Program""
Section 9.2.1.3, "Setting up Eclipse Environment to use Harvester via ANT"
Section 9.2.1.4, "Harvesting in Eclipse Environment using ANT"
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 9-10.
In the Name field, type Submit this project to Oracle Enterprise Repository
.
In the Location field, type <Harvester Home>\harvest.bat
. You can also browse the harvest.bat
file using the Browse button.
In the Working Directory field, type <Harvester Home>
. You can also browse the working directory using the Browse button.
In the Arguments field, type -file ${project_loc}
.
Click the Common tab.
In the Display in favorites menu pane, enable External Tools, as shown in Figure 9-11.
Figure 9-11 External Tools Dialog - Common Tab
Note: You must install Harvester in the same computer where you have installed eclipse. |
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 9-12.
Repeat the above steps to create another program called Submit this file to Oracle Enterprise Repository by using -file ${resource_loc}
instead of the ${project_loc} variable and to submit the individual files.
In the Eclipse Workspace, select Run, External Tools, External Tools Configurations.
Create a new ANT build.
In the Main tab, enter the following:
Buildfile: <Harvester_Home>\harvester-ant.xml
Base Directory: <Harvester_Home>
In the Targets tab, check the introspect-project
option.
In the Classpath tab, add the following external jars:
<Harvester_Home>\lib\mail-1.4.jar
<Harvester_Home>\lib\activation-1.0.2.jar
In the Properties tab, add the following properties/values
project.dir/${project_loc}
registration.status/<"Unsubmitted", "Submitted - Pending Review", "Submitted - Under Review", or "Registered">
repository.url/http://localhost:7101/oer/
repository.username/admin
repository.password/<encrypted password>
In the Common tab, enable the External Tools
option.
Click Apply, and then click Close.
After the configuration of the Properties tab, the External Tools dialog is displayed, as shown in Figure 9-13.
Figure 9-13 External Tools Dialog - Properties Tab
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 9-14.
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:
Section 9.2.2.1, "Configuring the Oracle Enterprise Repository Plug-ins for Repository Access"
Section 9.2.2.2, "Prerequisites for Using the Oracle Enterprise Repository Plug-ins for Eclipse"
For instructions on installing the Oracle Enterprise Repository plug-ins for repository access within the Eclipse-based Enterprise Repository Plug-in for Eclipse, see Oracle Fusion Middleware Installation Guide for Oracle Enterprise Repository.
Prerequisites for Using the Oracle Enterprise Repository Plug-in for Eclipse
Perform the following steps to install the Oracle Enterprise Repository plug-in for repository access:
Open Eclipse. The Eclipse window is displayed.
Click Help, Install New Software. The Install dialog is displayed.
Click the Add button that is found at the end of the Work With field. The Add Site dialog is displayed.
Enter Oracle Enterprise Repository in the Name field and http(s)://<hostname>:<port>/<context>-web/eclipse in the Location field.
Click OK.
Select Oracle Enterprise Repository and Click Next.
Review the items that must be installed.
Click Next and accept the agreement.
Click Finish.
In the Confirmation dialog, click Yes to restart Eclipse.
You can verify if the Oracle Enterprise Repository plug-in was installed by clicking Windows, Preferences.
Uninstalling the Oracle Enterprise Repository Plug-ins
The Oracle Enterprise Repository plug-in for Eclipse can be uninstalled the same as any other Eclipse plug-in through the Eclipse software update menu.
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.
You should complete the prerequisites described in this section before using the Oracle Enterprise Repository plug-ins for Eclipse:
Section 9.2.2.2.1, "Assign Users to an Oracle Enterprise Repository Project"
Section 9.2.2.2.2, "Enabling the Assets-in-Progress Properties"
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/oer-web/eclipse).
Two system settings must be enabled to activate Assets-in-Progress when using the Oracle Enterprise Repository Plug-in for Eclipse.
This procedure is performed on the Oracle Enterprise Repository Admin screen.
Click System Settings.
Click General Settings in the System Settings section.
Enter the cmee.asset.in-progress
property in the Enable New System Setting box and click Enable to reveal this hidden property.
Ensure the Asset in Progress property is set to True
.
Click Save.
Enter the cmee.asset.in-progress.visible
property in the Enable New System Setting box and click Enable to reveal this hidden property.
Ensure the Asset in Progress property is set to True
.
Click Save.
The Registration Status list now appears in the Search section on the Oracle Enterprise Repository Assets screen. For more information about Assets-in-Progress, see Oracle Fusion Middleware Configuration Guide for Oracle Enterprise Repository.
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:8080/oer-web/eclipse/
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.
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 must 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:
c:\eclipse\eclipse.exe -debug -consolelog -vmargs -DentityExpansionLimit=1048576
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 is either automatically displayed (in the case of querying the repository), or is launched by an explicit user gesture.
Note: If credential information had been specified in a previous session, the wizard is displays this persisted information when it is launched. |
In the Credentials area, as shown in Figure 9-15, 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.
Figure 9-15 Establish Enterprise Repository Connection
Click the Establish Connection button to ensure enterprise repository connectivity.
If a connection cannot be established, then an appropriate error message is displayed.
In Figure 9-16, once connectivity is established, you can either:
Click Finish to exit.
Click Next to select your workspace preferences (skip to Step 4).
Figure 9-16 Specify Workspace Preferences
Once connectivity is established, you can specify your workspace preferences:
Select a Repository project in Oracle Enterprise Repository that the submitted model is 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 is enabled for the default Oracle Enterprise Repository project. For more information about workspace preferences, see Oracle Fusion Middleware Configuration Guide for Oracle Enterprise Repository.
Click Finish to exit.
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.
For more information, see Oracle Fusion Middleware Configuration Guide for Oracle Enterprise Repository.
Note: Automated Usage Detection requires the installation of the Oracle Enterprise Repository Plug-in for Eclipse, and is currently compatible only with Eclipse and Eclipse-based IDEs. |
On the Window menu, click Preferences.
Select Oracle Enterprise Repository.
Select Workspace Automatic Usage Detection. The Workspace Automatic Usage Detection screen is displayed, as shown in Figure 9-17.
Figure 9-17 Preferences - Workspace Automatic Usage Detection
Click the Detect usage in workspace projects option, and then activate the desired usage detection features, as appropriate:
Enable usage detection in new workspace projects by default - monitors new projects
Detect usage of files on classpath - monitors files on classpath.
Detect usage of Java Runtime JARs - monitors Java Runtime JARs
Cache calculated SFIDs (recommended) - caches calculated SFIDs (enhances performance)
Detect usage of files matching pattern - monitors files matching specified patterns
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 are 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.
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.
This section contains the following topics:
Section 9.3.2, "Configure the Oracle Enterprise Repository Plug-ins"
Section 9.3.3, "Configure the Connection to Oracle Enterprise Repository"
Section 9.3.4, "Assign an Oracle Enterprise Repository Project to a .NET Solution"
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 9-18:
In the Title field, type OER - Harvest
.
In the Comman field, click the Browse button at the end of the field and select the harvest.bat file in the harvester 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 harvester directory.
Select the Use Output Window option. This option enables you to monitor progress.
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.
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 Section 9.3.5, "Enable Automatic Usage Detection".
To configure the Oracle Enterprise Repository plug-ins, you need the following prerequisites:
Microsoft Visual Studio 2008.
Microsoft Visual J# 2005 runtime. (If J# is not installed on your computer, the installer prompts you to 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, then you must configure the policy server to ignore (or unprotect) the following URL to allow the OpenAPI integration to function properly:
http://appserver.example.com:8080/OER/services/
To install VS .NET plug-in, perform the following steps:
Download the VS .NET plug-in Zip file from your Oracle Enterprise Repository instance at the following URL:
http://appserver.example.com/oer-web/integration/dotnet/OER103-VisualStudioAddin.zip
Unzip the OER103-VisualStudioAddin.zip file.
Locate and run the setup.exe program.
Follow the prompts, as shown in Figure 9-19, to select installation parameters.
Figure 9-19 Oracle Enterprise Repository Adapter Add-in for Visual Studio
Click Finish to complete the installation.
Follow the instructions in Section 9.3.3, "Configure the Connection to Oracle Enterprise Repository" to configure and establish a connection to an Oracle Enterprise Repository instance from VS. NET.
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 9-20, and provide the required login information.
OER URL: The URL of the Oracle Enterprise Repository instance, for example, http://appserver.example.com/OER.
Note: Do not includeindex.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.
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 OER Project from the submenu, as shown in Figure 9-21.
In the Project Selection window, use the Select the Oracle Enterprise Repository Project list to view the Oracle Enterprise Repository projects that you are assigned to, as shown in Figure 9-22.
Figure 9-22 Oracle Enterprise Repository Project Selection Dialog
Note: 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.
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.
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.
Launch Visual Studio .NET.
Open the Tools menu and click Options.
In 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 9-23.
Figure 9-23 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 9-24.
Figure 9-24 The Advanced Settings Dialog - Automated Usage Detection Tab
Click the File Pattern Detection tab to specify include and exclude file name patterns, as shown in Figure 9-25.
Figure 9-25 The Advanced Settings Dialog - File Pattern Detection Tab
Click Done to save your settings.