Monday, 14 October 2013

Why to use Java Method Server?

There are 3 execution agets available:
1)      Dmbasic method server:- Can be used for dmbasic methods.
2)      Java method server:- Can be used for java methods.
3)      Documentum content server:- Default execution agent
Documentum content server can launch any executable program i.e. dmbasic, java, dmawk or any standalone program written in C,C++.

Then what is the use of having separate method server?
·         Method server is the customized version of Apache Tomcat which can be used for execution of Documentum java methods. So methods are run as servlets under application container.
·         So we can invoke multiple instances of a same method without spawning multiple instances of JVM process.
·         This provides performance benefit as well as saves memory.
·         JMS runs as a separate process independent of content server so it can be start-stopped as and when needed.

Tips: Not to use same JMS tomcat container to deploy wdk applications as it’s a customized one and many features have been eliminated.

How to write a Java method:
        I.            Implement IDmMethod interface.
      II.            Implement method execute(Map params, OutputStream ostream). Here Map contains arguments like repository name, login user name, workitem if you are creation workflow method etc.
    III.            Obtain session using newSessionManager.
    IV.            Handle exceptions.
      V.            Release sessions and collections used.

How to check if Method server is running?

http://<hostname>:9080/DmMethods/servlet/DoMethod

No comments:

Post a Comment