Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
engswee
Active Contributor

The following steps are continued from Demystifying Custom Adapter Development: Part 1a - Cloning the Sample JCA Adapter.

Step 4 - Creating the Adapter Metadata in ESR

Next we will import the Adapter Metadata into the ESR.

i) Update JNDIName in the metadata file

SampleRA.xml is the Adapter Metadata file which was extracted from the XIAF SCA file (in Step 1 - ii).

Update the JNDIName value following the name of the Java Project (in Step 2 - i).

ii) Create Adapter Metadata object in ESR

Create a new namespace in ESR and then create a new Adapter Metadata object. The combination of adapter name and namespace must match exactly the values used in Step 3 - ii above.

Upon creation of the object, it will provide a default metadata. Overwrite this metadata by importing the modified SampleRA.xml above.

Activate the new metadata object.

Step 5 - Building and Deploying the Adapter

We are now ready to build and deploy the adapter!

i) Export JAR file for Java project

Firstly, we export the JAR file of the Java project. The destination of the export will be the connectorModule folder of the RAR project.

Once the export is completed, refresh the RAR project and verify that the JAR file is in the connectorModule folder.

ii) Export RAR file for RAR project

Right click on the RAR project and export it as a RAR file.

The destination will be the root folder of the RAR project itself.

Once the export is completed, refresh the RAR project and verify that the RAR file is available.

iii) Deploy the RAR file to the SAP AS Java server

Prior to deployment, make sure that the AS Java server is configured under Windows > Preferences > SAP As Java.

Switch to the Deployment perspective. Click Import and select the RAR file from the workspace.

Click Start to begin deployment of the RAR file.

Upon completion, the following pop up dialog will display the result of the successful deployment.

iv) Verify deployment was successful

We can verify that the deployment was really successful with the following tools.

Go to NWA > Troubleshooting > Logs and Traces > Log Viewer. Check that the following errors are generated - they are just sample messages and can be ignored.

Go to NWA > Configuration > Infrastructure > Application Modules. Enter the filters for Type and Application to verify that the resource adapter is available.

Go to NWA > Troubleshooting > Java > JNDI Browser. Navigate to the deployedAdapters folder and verify that the JNDI object name is correctly registered. The JNDI name specified in the Adapter Metadata must match this value.

Go to NWA > Operations > System > Start & Stop. Select Java Applications tab and filter by the adapter name. Check that the application status is started.

Step 6 - Using the Adapter in a Communication Channel

After successful deployment, we can create communication channels using this new adapter.

Select the Adapter from the list of adapter and populate all the mandatory fields.

Activate the channel and check that it's successful in the Communication Channel Monitor.

Ta-daaaa!

This channel can then be used in an integration scenario as per normal configuration. However, usage of this channel which is based on the sample adapter's behavior will not be covered here.

Conclusion

As shown above, with clear and concise steps, we are able to setup the projects in NWDS correctly to build and deploy a clone copy of the sample JCA adapter. Communication channels can then be created to use this adapter in integration scenarios. The sample JCA adapter provides some simple logic to connect to the file system of the PI system.

This clone adapter forms the basis for the subsequent posts in this series. We will look at the different aspects of the development, and aim to change the logic and behavior of the adapter according for an example requirement.

In the next post we will be examining the source codes of the custom adapter, looking at some of the key classes and methods in order to understand the behavior of the adapter. Watch this space!

Other Parts of this Series

Demystifying Custom Adapter Development: Part 1a - Cloning the Sample JCA Adapter

Demystifying Custom Adapter Development: Part 2 - Examining the Adapter's Key Classes and Methods

Demystifying Custom Adapter Development: Part 3 - Examining the Deployment and Metadata Files

Demystifying Custom Adapter Development: Part 4 - Modifying the Adapter's Functionality

Demystifying Custom Adapter Development: Part 5 - Creating an HTTP Poller with OAuth 2.0 authenticat...

3 Comments
Labels in this area