How to deploy Java custom code into Identity Manager

Document ID : KB000039404
Last Modified Date : 14/02/2018
Show Technical Document Details

Introduction/Summary: 

This document details different cases on deploying custom code. Identity Manager’s custom code is mainly written in Java. Java allows different packaging and deployments, however, not all will work with Identity Manager. This document will explain how to deploy such custom code into Identity Manager.

 

Background:  

Identity Manager allows various ways of customizations using programming coding including Java, Javascript and more. This focuses on Java only.

Java itself allows two main ways to deploy its class files:

1. Package classes in a jar file. Then, include the jar file in your application classpath.

2. Place your class files in an exploded fashion under a folder that’s already included in your classpath.

 

Identity Manager runs in the context of its application server. Identity Manager is actually running under the IAM Framework that links with the application server and uses its services.

The IAM Framework is not a standard deployer of the application servers. The IAM Framework was not written to J2EE standards for extension usage.

There are mainly two types of custom code for Identity Manager:

1. Classes that plug into Identity Manager including: BLTH, LAH, Event Listeners. This is documented and designed for.

2. Classes that support new JSP pages that customers may want to write on their own which are placed ‘on the side’ of Identity Manager.

 

The first type of classes (BLTH, LAH, Event Listener) run inside a calling thread of the application. Considering that IAM Framework is not a standard deployer, they can only be deployed in the way allowed by the Framework. This , as documented, is to place them in /iam_im.ear/custom folder. In that folder they can not be packaged as a jar file, but must be placed in an exploded class folder structure. These classes can not be placed in another location under the application server since IAM Framework specifically looks to find them under /custom.

The second type of classes are part of the user interface. The user interface runs under /iam_im.ear/user_console.war.   If you write your own JSP pages, then the supporting java classes need to be placed under /iam_im.ear/user_console.war/web-inf/lib. These classes must be packaged in a jar file rather than deployed in an exploded way.

 

To emphasize, since IAM Framework is not a Standard Deployer, then it explicitly looks up classes and does not use the application server to look them up. Therefore it will only find them where it specifically looks for them.

 

Environment:  

Applies to Identity Manager 12.0, 12.5 and 12.6.

Any application server.

 

Instructions: 

-      To deploy a BLTH, LAH, Event Listener:

o    Place your exploded class folder structure under /iam_im.ear/custom. Make sure your folder names use the same case as your java code since the Java class loader is case-sensitive.

o    Make sure you do that on each application server cluster node.

 

-      To deploy new or additional web pages:

o    Place your supporting java classes for your own JSP pages that were packaged in a jar file under /iam_im.ear/user_console.war/web-inf/lib.

 

Additional Information:

None.