Contact us | Links

IBM Websphere 4 compatibility howto

This howto contains information for IIOP.NET 1.2.3 or newer.

Accessing the name service

The Websphere nameservice can be accessed from a .NET client with the following code:

    RmiIiopInit init = new RmiIiopInit(nameServiceHost, nameServicePort);
    NamingContext nameService = (NamingContext)init.GetNameService();

Because the type of the NamingContext returned is Websphere-specific, the following file must be added to every IIOP.NET Websphere client, when using an IIOP.NET version prior to 1.3.1:

    using Ch.Elca.Iiop.Idl;
    using Ch.Elca.Iiop.Services;

    namespace {
        public interface NamingContext : {


Hint: This interface has been added to the channel in version 1.3.1.

Hint: The nameservice is listening normally on port 900.

Using an EJB

The ejb home interface is accessed using the name service in the following way:

    NameComponent[] name = new NameComponent[] { new NameComponent("domain", ""),
                                                 new NameComponent("legacyRoot", ""),
                                                 new NameComponent("MyHome", "") };
    // get the reference to the adder-home
    MyEjbHome myHomeIf = (MyEjbHome)nameService.resolve(name);

The namecomponents domain and legacyRoot are needed for every ejb home interface for WAS 4.

The ejb can now be created using this home interface (standard ejb pattern):

    MyEjb myBean = myHomeIf.create();

About this project

This project is maintained by Elca Informatique SA and was developed in collaboration with the Programming Languages and Runtime Systems Research Group of the ETH-Zurich as part of Dominic Ullmann's diploma thesis.

IIOP.NET Use Cases

Read the IIOP.NET success stories.


© 2003-2004 ELCA All Rights Reserved