Contact us | Links

Bea WebLogic 8.1 compatibility howto

Accessing the name service

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

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

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

    //wls81naming.cs

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

    namespace weblogic.corba.cos.naming {

        [RepositoryIDAttribute("IDL:weblogic/corba/cos/naming/NamingContextAny:1.0")]
        [InterfaceTypeAttribute(IdlTypeInterface.ConcreteInterface)]
        public interface NamingContextAny : omg.org.CosNaming.NamingContext {
        }

    }

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

Hint: The nameservice is listening normally on port 7001.

Using an EJB

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

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

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.

News

 
© 2003-2004 ELCA All Rights Reserved