Skip navigation FileNet logo
  Open Client Developer's Guide
  Search  |  Index  |  Glossary   |  
Close menu Overview
  About This Guide
  What's New in 3.3
  Open menu Introduction to the Toolkit
  Close menu Programming Considerations
    View State Management
    Open Client and ActiveX
    Section 508 Compliance
    COM Objects and JiGlue in the .NET Environment
Open menu Open Client Architecture
Open menu Developing for Process
Open menu Error and Exception Handling
Open menu Customizing the Framework
Globalization / Localization
Open menu General Information
   

Developing with IDM COM Objects and JiGlue in the .NET Environment

Open Client is built on top of FileNet IDM Web Services 3.3 and Microsoft ASP.NET. This configuration enables developers to leverage IDM COM objects when writing custom Web applications. Customers may implement IDM COM objects in ASP.NET applications that use the Single Threaded Apartment (STA) model, which is required by FileNet IDM Objects. Support for using IDM COM objects in other environments, such as .NET remoting, Microsoft Windows Services, Web services, or VB.NET, is not yet available. However, FileNet is working closely with Microsoft to determine the future strategy for delivering data services in .NET.

The following sections describe points to consider when developing with IDM COM objects and .NET. For a list of the IDM COM objects currently used in Open Client, see COM Objects Implemented in Open Client.

Performance

Minimize COM Calls

COM calls from .NET require marshaling, which can negatively impact application performance. To avoid this condition, COM calls should be minimized by using data caching and ADO whenever possible.

Perform Single Thread ADO Searches

When executing a search using ADO, set ASPCOMPAT="True" in each ASPX page.

Threading Model

FileNet IDM Objects are STA

FileNet IDM COM Objects run under the STA model. Therefore, in order to call FileNet IDM Objects, the ASP.NET Web application must utilize the STA threading model. To ensure that the STA model is in use, set ASPCOMPAT="True" in all ASPX pages that intend to call IDM Objects. Note that the ASPCOMPAT flag defaults to False when no other value is specified.

JiGlue is MTA

JiGlue is used in Process integration to bridge from COM to Java, and is the only COM object that runs under the Multi-threaded Apartment model (MTA). For this reason, the ASPCOMPAT flag must be set to False in all ASPX pages that intend to use JiGlue. Setting ASPCOMPAT="True" when using JiGlue can cause random "Invalid callee" exceptions (this is a known ASP.NET JiGlue issue).

Note: When implementing ADO to query the database (such as when performing large-scale queries, in lieu of querying the queues via the Process API — for information, see Using ADO to Query the Process Database in the Help for Process Developers on the Process Documentation for FileNet Image Manager CD), the ASPCOMPAT flag must be set to True.

Unified Logon

The thread that is responsible for executing the logon operation must run in the NT account security context. The following two options are available for impersonation:

Option 1

Perform the impersonate before the logon operation, and then undo the impersonation after the logon is achieved; set ASPCOMPAT=True.

To accomplish this option, the NT account security context must be assigned to the running thread, otherwise, the thread will run under the predefined ASPNET account. The disadvantage of using this option is the additional need to perform the impersonation before accessing any shared resources, such as the use of a temporary file when adding a document.

Option 2

Set <impersonate=“true”> in web.config.

The advantage to using option two is that it is possible to impersonate any thread. However, the disadvantage is that the ASPCOMPAT flag must be set to True in order to use impersonation, which does not work with JiGlue because it operates under the MTA threading model.

The recommendation is to not set <impersonate=“true”> in web.config. Instead, use dynamic impersonation during the logon operation, as well as other operations like adding a document or updating properties. Keep in mind that these options only apply to the unified logon scenario.

Known Issues

Do Not Type-Cast an IDM Generic Object

An IDM generic object cannot be type-cast into another IDM object, such as a document, folder or stored search object. This is a known .NET issue (it is understood that Microsoft will supply a fix for this in the next .NET service release). To workaround this issue, use the hidden IFnxxxDual interface of the object in the typecast statement. For example:

oGeneric=oLib.GetObject(...)
oDoc=CType(oGeneric,IDMObjects.IFnDocumentDual)

Do Not Combine Multiple Calls to JiGlue in .NET

Multiple method calls to JiGlue cannot be combined in a single .NET statement, such as:

JiglueObj1.setXYZ(JiglueObj2.getABC())

While the above statement may only fail in some cases, when a failure does occur, the resulting symptoms may be very obscure and can cause performance problems.

Do Not Combine Multiple COM Calls in .NET

Multiple COM calls cannot be combined in a single .NET statement, such as:

ComObj1.GetProp(ComObj2.getName())

Note that failure may only occur in some cases.