This is a question that comes up every so often in the forums. Unfortunately there is no place, I am aware of, where this really gets explained and it seems to require the knowledge of mysterious URL’s. Is there an easy way?
I wanted to always blog this, but somehow I just never did. Let’s unveil it now.
Just Starting With Extending RTC?
If you just get started with extending Rational Team Concert, or create API based automation, start with the post Learning To Fly: Getting Started with the RTC Java API’s and follow the linked resources.
You should be able to use the following code in this environment and get your own automation or extension working.
Differences between Tomcat and WebSphere Application Server
The deployment process on Tomcat and WebSphere Application Server (WAS) is basically the same. The folders where you deploy the extension are the same within server/conf/ccm . The mechanisms described below work the same for WAS, except the location of the file built-on.txt.
Internal Tools
The best way to check if a server extension is deployed on a server is to use some Internal Tools. These hidden Internal Tools are also the easiest way to enforce redeployment of the applications and added extensions.
The internal tools can be accessed by injecting the string ?internal=true into the server administration URL for a Jazz application. This makes it available on the Server Administration page. It is possible to append the string above behind the URL for the main administration pages and then open the server administration. If the server administration page is already open and it contains an action the string needs to be injected before the # (hash tag) separating the action from the base URL.
The image below shows the injected string in the server administration page before the action.
The image below shows the URL when just appending the string before opening a specific server administration page.
https://<server>:<port>/jazz/admin?internal=true#action=jazz.viewPage&id=com.ibm.team.repository.server
shows the internal tools menu that can then be used to look at data that is usually not revealed.
Use the Component Status menu action to check if an extension is deployed. It opens the Component Status page with all components that are deployed. You can then use the browsers find functionality to search for your extension, or rather the name of the component you chose. If you followed my advice and chose a unique and easy naming schema, you should be able to find it. The image below shows the example of the RTC Extensions Workshop at the end of the list. Searching for rtcext revealed this in no time.
If your component does not show up, fix your deployment and try again.
Use the Server Reset menu action to trigger a re-provisioning of all extensions. Reboot the server after pressing the button. If a new version of an extension is deployed, this makes sure that the cache gets deleted and all the features, including the new version, are re-read.
Server Patch Extension
** Update ** Eric suggests another way to be able to see your extension in the comments below. Use the Server Patch Extension – https://jazz.net/wiki/bin/view/Main/ServerPatchExtension so that your plugin is listed on the CCM Admin Page
“Undeploy” or Deploy a Fix or New Version
To get rid of custom extensions, it is necessary to remove the files that belong to the deployed extension and then you have to force a server reset and redeploy. The files that typically belong to a server extension are
- The provision profile file. This is a file with extension *.ini located in the server\conf\ccm\provision_profiles folder, created for the extension that specifies the feature and its site location
- The extension specific site folder usually located in the folder server\conf\ccm\sites that contains the site.xml and the plug-ins and features in sub folders
To update or deploy a new version you can:
- Deploy the new version (overwrite the existing files mentioned above)
- Force a server reset and restart the server
This works if the file names and the structure does not change. If you are not sure and you don’t want to leave any remnants you can
- Undeploy the old version by removing all deployed files and folders
- Deploy the new version
- Force a server reset and restart the server
This is the most secure approach.
Force Server Reset and Redeploying using Internal Tools
The runtime of the Jazz servers caches information about deployed applications. If a new version of an application is deployed, the server would not pick that up and would not redeploy it. To enforce redeploying, it is necessary to request a server reset. There are several ways to do that.
One way is to use the Internal Tools and click on the Server Reset menu action. On the page displayed, click the Request Server Reset button. Next time the server is started, all plugins are redeployed.
Force Server Reset and Redeploying – Alternative Approach
If your server is not up, another way to enforce a server reset is to search for the file built-on.txt in the work folder of your application server. If this file is deleted, a server reset is performed the next time the server starts. For Tomcat you can find the file in the work folder of the application.
For the traditional WebSphere Application Server you should find the file located somewhere underneath the profile folder.
For the WebSphere Liberty Profile application server, you should find the file located somewhere underneath the workarea folder. E.g. in [Install Dir]\JazzTeamServer\server\liberty\servers\clm\workarea\.
Please note that the built-on.txt file is also located in WEB-INF folder in the WAR file and in the WEB-INF folder of the deflated war file. Don’t delete these files.
Summary
The Internal Tools provide an easy way to find out if a custom component is deployed and to request a server reset.
As always I hope this helps practitioners out there to be more effective.