Additional libraries

A custom API policy that performs tasks beyond fairly basic operations is likely to need external libraries (jars), for example Log4J or a database connector. As you may have observed in the execute() method, the provided implementation makes use of Log4J. As the custom policy also needs to determine whether an IP maybe within a network range the Apache common net package is also exploited.

To use libraries such as Log4J or Apache commons, for example, requires the jars to be either:

  • Manually deployed and included into the gateway classpath.
  • Be part of a standard WebLogic/gateway deployment.
  • Incorporated into the policy deployment packaging.

This last option will in effect ensure that the jars get deployed into the ...

Get Implementing Oracle API Platform Cloud Service now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.