Contact us | Links

JBoss 3.2 compatibility howto

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

Accessing the name service

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

    NamingContext nameService = (NamingContext)RemotingServices.Connect(typeof(NamingContext), nameserviceIOR);

The nameserviceIOR is the IOR printed by JBoss at startup in a line [CorbaNamingService] Naming: [IOR: -- a hex string --].
The IOR consists of IOR: and the long hex string.


Hint:
The RemotingServices class can be found in System.Runtime.Remoting.

Using IIOP.NET 1.4.0 (or above), the nameservice can be accessed by a corbaloc:iiop address:

    string nameserviceLoc = "corbaloc::" + nameServiceHost + ":" + nameServicePort + "/JBoss/Naming/root";
    NamingContext nameService = (NamingContext)RemotingServices.Connect(typeof(NamingContext), nameserviceLoc);

Hint: The nameService is listening normally on port 3528.

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();

Known problems

  • The jndi-name (see jboss.xml) for the ejb may not contain more than four components at the moment,
    because of a problem in JBoss (see bug nr. 746448 on JBoss page)

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