About overloaded methods and nested IDL

Most EJB home interfaces have overloaded methods, and many imported Java components use nested IDL modules.

Overloaded methods

The Java interfaces for an EJB component may have overloaded methods; that is, several methods with the same name that differ in the number and type of parameters. For example, a home interface may contain several create methods. EAServer maps such methods to uniquely named IDL methods by appending two underscores and a suffix to the Java method name. ActiveX does not support overloaded methods, so you must use the full IDL method names for methods that are overloaded in the Java interface.

For example, if a Java home interface has these methods:

mypackage.MyBeanRemote Create()

mypackage.MyBeanRemote Create(String p1, long p2)

mypackage.MyBeanRemote Create(
       String p1, String p2, long p3)

The IDL equivalent might be:

mypackage::MyBean Create()

mypackage::MyBean Create__String(string p1, long p2)

mypackage::MyBean Create__StringString(
       string p1, string p2, long p3)

To determine the full IDL method names, view the IDL interface in EAServer Manager.

Nested IDL modules

EAServer supports nested IDL modules. IDL modules that define the interfaces for an EJB component typically follow the Java package structure of the component’s Java interfaces. For example, if the Java interfaces are in the Java package com.sybase.foo, IDL interfaces are in module com::sybase::foo. When implementing ActiveX clients, you must understand how nested IDL modules are mapped to ActiveX interface PROGIDs and the type names used in Object.Narrow_ calls.

The ActiveX PROGID for an IDL type defined in a nested IDL module follows this naming pattern:

module1_module2_module3.typeName

Each nested module name is preceded by an underscore, and the IDL type name is preceded by a period (.). For example, the PROGID for IDL type com::sybase::foo::MyBeanRemote is com_sybase_foo.MyBeanRemote.

When specifying type names in Object.Narrow_ calls, substitute a forward slash (/) for every double-colon (::) in the IDL type name. For example, if the IDL type is com::sybase::foo::MyBeanRemote, use com/sybase/foo/MyBeanRemote in the call to Object.Narrow_.