Method Server DevTools Whitepaper
Method Server DevTools Whitepaper
Abstract: This document highlights the technically obscure areas of Content Server to facilitate Developer Support assignments.
Date 3/15/2007
Copyright 2007 EMC Corporation. All rights reserved. EMC believes the information in this publication is accurate as of its publication date. The information is subject to change without notice. THE INFORMATION IN THIS PUBLICATION IS PROVIDED AS IS. EMC CORPORATION MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WITH RESPECT TO THE INFORMATION IN THIS PUBLICATION, AND SPECIFICALLY DISCLAIMS IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Use, copying, and distribution of any EMC software described in this publication requires an applicable software license. EMC2, EMC, and EMC Documentum product names are trademarks of EMC Corporation. All other trademarks used herein are the property of their respective owners. All other brand names are trademarks or registered trademarks of their respective owners.
The Content Server process orchestrates the entire function of repository. When a client invokes a method server call, it delegates the call (based on the method) to appropriate execution agents. The Content Server version 5.2.5 and 5.3 has three execution agents:1) Content Server 2) Docbasic method server 3) Java method server The methods can be a Docbasic script, Java class or a self executable program written in another programming language such as C++. For every method, we have to create a method object of type dm_method. The attributes of that method object will define arguments and the execution parameters. Methods are executed by issuing a DO_METHOD administration method or using a job. Using a DO_METHOD allows you to execute the method on demand. Using a job allows you to schedule the method for regular, automatic execution.
Not just any Visual Basic application can run as method. The rules are the same for development in Visual Basic as well as Docbasic or GAWK. You can NOT have any graphical user interface in a method. The process runs on the server host and there is no way to interact with it from the client. Also, you must make the program a command line executable that accepts the necessary parameters at the start of execution.
Sub Entry_Point _ (objId As String, _ docBase As String, _ userName As String, _ ticket As String) ' Connect with Docbase
buff = "connect," & docBase & "," & UserName & "," & ticket sess_id = dmAPIGet(buff) ' If any error occues then: Call Connect_Handler() End Sub ' ' Handle and report any errors ' Sub Error_Handler (sess As String) buff$ = "getmessage," & sess mesg$ = dmAPIGet(buff$) print "Message: ";mesg$ Stop End Sub ' ' Retrieve any connection related information ' Sub Connect_Handler () buff$ = "getmessage,a" mesg$ = dmAPIGet(buff$) print "Message: ";mesg$ Stop End Sub
Technically all Documentum Java Sever methods are simple java classes, which implements IDmMethod interface. When a DO_METHOD method directed to the Java method server is issued (with the Java method class name and parameters), it generates an internal HTTP_POST request. The Java method server invokes the do_method servlet to service the request.
A common mistake
The Tomcat provided with Content Server to run Java method is not a full blown Tomcat. It has been customized by eliminating many features, so it is not suitable to work as a generic Servlet container. Often, a customer may deploy a WDK application on this Tomcat and run into issues. Such deployment will not work and unsupported by Documentum.
public class MyServerMethod implements IDmMethod { public void execute(Map params, OutputStream ostream) throws Exception // Log on the to docbase and get a session manager like this // IDfSessionManager sessionMgr = dfClient.newSessionManager(); // and get a session from the session manager {
// Add your business logic here ... } catch (DfException e) { ostream.write("A DfException occurred".getBytes()); ostream.write(e.getMessage().getBytes()); e.printStackTrace(); // spit out to stderr as well throw e; } finally { // If session is not null release the session to the // session manager here. } }
procedure. In such cases, the method_verb must be a fully qualified path name. If unchecked, the server uses the system call to execute the procedure. 14) Check Use Method Server. 15) When done, click the Finish button to return back to the Methods page. The figure below shows a typical entry in method object for a Java method
or
$DOCUMENTUM/dba/log/<repository_id>/MethodServer/MethodServer/server_config_name.log
The log file is created when the method server is started. If a method server log file currently exists, it is saved with a time stamp and a new log file is started. To trace method execution on the Java method server, set the trace parameter in the web.xml file to true. For example:
<init-param> <param-name>trace</param-name> <param-value>t</param-value> </init-param>
The web.xml file is found in %DM_HOME%\tomcat\webapps\DmMethods\WEBINF\web.xml ($DM_HOME/tomcat/webapps/DmMethods/WEBINF/web.xml). The log files generated by the Java method server are stored in %DM_HOME%\tomcat\logs ($DM_HOME/tomcat/logs).
Order of starting index sever and java method server do not matter. For shutdown, follow the reverse order.
Challenge Questions
1) 2) 3) 4) 5) What is a Documentum Server Methods? How many types of Server Methods are supported? Who executes the Server Method? What interface does a Java Server Method need to implement? How to check if a method server is running?
10
About EMC EMC Corporation (NYSE: EMC) is the world leader in information storage systems, software, networks, and services, providing automated networked storage solutions to help organizations get the maximum value from their information, at the lowest total cost, across every point in the information lifecycle. Information about EMCs products and services can be found at www.EMC.com About Documentum Software from EMC EMC Documentum software includes enterprise content management solutions that enable organizations to unite teams, content, and associated business processes. With a single platform, EMC Documentum software enables people to collaboratively create, manage, deliver, and archive the content that drives business operations, from documents and discussions to e-mail, Web pages, records, and rich media. The Documentum enterprise content management platform makes it possible for companies to distribute all of this content in multiple languages, across internal and external systems, applications, and user communities. As a result of deploying Documentum, thousands of the worlds most successful organizations are harnessing corporate knowledge, accelerating time to market, increasing customer satisfaction, enhancing supply chain efficiencies, reducing operating costs, and improving their overall competitive advantage. For more information about Documentum enterprise content management, visit www.emc.com/documentum or call 800.607.9546 (outside the U.S.: +1.925.600.5802).
11