In the previous section, a portlet using an active credential object was built. Although this is the preferred type of credential object, there are certain cases where you have to use passive credential objects, for example when an appropriate active credential class is not available.
In this sample scenario, the portlet will be changed to use a passive credential object. To modify the portlet application, proceed as follows:
In the CredentialJSR project, open the CredentialJSRPortletSecretManager class.
Using the Java editor, add to the class the method shown in Example 21-8 to support passive credentials.
Example 21-8. The getConnectionUsingPassiveObject method (passive credentials)