Jeff Potts
KM Whirled: Collaboration, Portal, Content Management, Search, and a dash of personal info most people won't care about
















Navigator Logo

CMPros Logo

Subscribe to "Jeff Potts" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.


My blog is now located at http://ecmarchitect.com If you are not redirected automatically, please follow the link.

Thursday, June 16, 2005
 

When you create custom Java methods for Documentum's Java Method Server you can add the class or JAR files to $DOCUMENTUM/dba/java_methods and they'll get added to the Java Method Server's classpath automatically. However, if those methods leverage BOF classes, you may need to do some tweaks so that the Java Method Server can load those classes.

Currently, our preferred approach for telling the content server where our custom classes live is to create a directory off of $DM_HOME, let's call it nav/lib for this discussion, in which our JARs live. We then create a JAR that only contains a manifest, we'll name it nav.jar, in $DM_HOME. The manifest points to the JARs in nav/lib. This enables us to have a single file in the classpath, nav.jar, with as many additional JARs in nav/lib as we need and we only have to update the manifest file in nav.jar when we make changes rather than changing the classpath.

Documentum does this as well. That's what dctm.jar is all about. It contains no classes. Only a manifest. Here's what's in the dctm.jar's manifest.mf:

Manifest-Version: 1.0
Created-By: Documentum Installer Component Library
Class-Path: Shared/dfcbase.jar Shared/dfc.jar Shared/bsf.jar Shared/lo
 g4j.jar Shared/xalan.jar Shared/xercesImpl.jar Shared/xmlParserAPIs.j
 ar Shared/xml-apis.jar Shared/All-MB.jar Shared/ldapjdk.jar Shared/ld
 apfilt.jar Shared/jss311.jar Shared/certj.jar Shared/sslj.jar Shared/
 jsafe.jar Shared/jnet.jar Shared/ldap.jar Shared/ldapbp.jar Shared/jn
 di.jar Shared/bpmutil.jar Shared/ci.jar Shared/subscription.jar Share
 d/workflow.jar Shared/xforms.jar Shared/dam_services.jar Shared/tar.j
 ar Shared/wcm.jar Shared/WcmMethods.jar

An easy way to create a JAR with only a manifest is to use the Ant jar and netsted manifest tasks, like this:

<target name="classpath_jar">
    <jar destfile="${dir.dist}/nav.jar" excludes="*.jar" >
        <manifest>
            <attribute name="Class-Path" value="nav/lib/nav_server.jar nav/lib/someother.jar nav/lib/andanother.jar"/>
        </manifest>
</jar>
</target>

On UNIX servers, the Java Method Server is started manually using Tomcat's startup.sh script. There are many ways to tell Tomcat about classes you want to share across webapps. The way Documentum does it (and therefore, the technique we've copied) is to update setenv.sh to include dctm.jar (or in our case, nav.jar) in Tomcat's classpath.

When your content server runs on a Windows host, however, the Java Method Server is started as a service which calls tomcat.exe. If you want to use a similar approach as described above, you can use regedit to update the registry so that the right arguments are set when tomcat.exe is run. In this case, the classpath needs to be updated to include nav.jar.

The key you need to update is HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesDmJavaMethodServerParameters. On my content server the classpath argument was in the string named JVM Option Number 0. I updated mine to include nav.jar, like this:

-Djava.class.path=C:Program FilesDocumentumtomcat4.1.27binbootstrap.jar;C:Program FilesDocumentumjdk131_04libtools.jar;C:Program FilesDocumentumdctm.jar;C:DocumentumConfig;c:program filesDocumentumnav.jar

After you make the change, restart the Documentum Java Method Server service and your methods will be able to find your BOF classes without a problem.


12:56:49 PM    


Click here to visit the Radio UserLand website. © Copyright 2005 Jeff Potts.
Last update: 10/13/2005; 4:55:34 PM.
June 2005
Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
May   Jul
Navigator Logo