-
Notifications
You must be signed in to change notification settings - Fork 10
OracleASDeployment
Here you will find instructions about how to deploy Google Connector Manager in OracleAS 10g and, specifically, in the 10.1.3 version of the standalone JEE server called OC4J. This deployment has been done only for testing and demo purposes and it is not supported in any way.
In order to successfully complete this deployment tutorial, you will need to download and install the following components:
- Google Connector Manager binaries and source code
- Oracle Containers for Java EE (aka OC4J) 10.1.3
- Oracle JDeveloper 10.1.3
All the instructions explained here has been done for and tested in Windows XP Professional operating system, although OC4J is a quite portable JEE engine and you should be able replicate the deployment in Linux or any other operating system supported by OC4J.
JDeveloper and OC4J are really easy to install. Just follow Oracle instructions.
In order to successfully compile and deploy the connector manager in OC4J, you need to add JUnit testing environment to JDeveloper. You can easily download it as a JDeveloper plugin, usint the Help->Check for Updates... option of JDeveloper.
The easiest way to deploy and test the connector manager in OC4J is to create a war file with:
- Connector manager and additional needed libraries.
- Mock connector and third party components needed (JSON libraries, for example).
- Connector configuration files
You will learn how to easily build that war file using JDeveloper, following the next steps:
- Unzip connector war file and extract the libraries included somewhere accesible from JDeveloper.
- Create a JDeveloper application with an empty JDeveloper project in it
- Add the libraries extracted in the 1st step to the project, right-clicking on the project name and choosing "Project Properties...", selecting libraries and clicking on "Add Jar/Directory..." button.
- Add JUnit Runtime, JCR Common Runtime and Servlet Runtime to the project, using the same procedure than in the previous step, but using "Add Library..." button.
- Uncompress the connector manager source file and look for the "javatests" folder. Copy all the following folders under your_jdeveloperproject\src folder: * com\google\enterprise\connector\mock * com\google\enterprise\connector\jcr * com\google\enterprise\connector\pusher
- Create the following folders under your_jdeveloperproject\src folder: * config * org\json
- Download JSON Java classes from here and copy to the org\json folder created in the previous step.
- Find
connectorInstance.xml
andconnectorType.xml
files undertest-connectorA
folder in the connector manager source zip, and copy them under the "config" folder you created in the previous step. - Find
applicationContext.xml
andapplicationContext.properties
under "etc" folder in the connector manager source code zip. - Copy these two files under
your_jdeveloperproject\public_html\WEB-INF
folder. EditapplicationContext.properties
file and substitute "localhost" by your favorite GSA host name or IP address. - Extract
web.xml
file from the connector manager war file toyour_jdeveloperproject\public_html\WEB-INF
folder. - In this point, you should be able to see all the files in your JDeveloper project. It is time to create a WAR file. Choose "File->New->Deployment Profile" in JDeveloper. Be sure that all the needed libraries are included under "WEB-INF/lib Contributors" section. You should check all of them but the Servlet Runtime.
- Deploy to war file, right-clicking on the WAR file deployment profile created in the previous step.
At this point, you should have an OC4J instance up and running, after having followed Oracle instructions for that. The OC4J admin console should be available in: http://OC4J_HOST:OC4J_PORT/em/console
. Using it, deploy the WAR file created in the previous section. We will assume that you chose connector-manager as web context for that war.
After that, find MockRepositoryEventLog1.txt
in the connector manager source zip and copy it under yourOC4JDirectory\j2ee\home\applications\connector-manager\connector-manager\WEB-INF
directory.
Simply follow the Connector configuration for the mock connector described in these steps of the Google Connector Develooper guide:
http://code.google.com/apis/searchappliance/documentation/50/connector_dev/cdg_buildtest.html#runcm http://code.google.com/apis/searchappliance/documentation/50/connector_dev/cdg_buildtest.html#testconn
It should start feeding and serving.
You can download a JDeveloper project from this link and simply unzip and use. Remember to change localhost
by your GSA host name in the applicationContext.properties
file before deploying.