Embedding the CORBA Interface in JBoss

I am looking for a tutorial or any additional information on how to make an EJB (or basic MBean) available through CORBA.

That's all I found: http://www.jboss.org/jbossiiop

I have an existing CORBA server (java-based but non-standard) and I want to allow it to call my JBoss MBean. This MBean is already open via RMI using EJB (v2.1).

The current target version of AppServer is jboss-eap-4.3.


Edit: I hope my question is too vague to get an answer, so here's the update:

I want my EB running on JBoss to register with ORB Corba running on a remote separate server. At least I think I know. An existing CORBA client connects to services through a specific IDL / interface, which I am trying to implement using JBoss EJB. At this stage, the client is connected to several instances of the same interface to obtain information and manage local (same processes) services through this interface. I want JBoss EJB to be removed as just another implementation of this CORBA IDL.

My understanding of CORBA is rusty and weak to start, so I'm not very far away. I can start ORB in JBoss quite easily, but it’s not clear to me how to configure the binding so that the “obsolete” CORBA ORB can find it. I can change any part of the JBoss implementation to make this work, but changing a different server is difficult.

Is there a way for EJB to register on a remote server (ala jndi)? Will an existing client be able to connect to Jacorb without adding special jboss classes?

+3
source share
2 answers

In short, you must implement the adapter, deploy it to Jboss, register it using the remote NamingService. In the adapter implementation, you invoke your MBeans.

Now in more detail You have CORBA idl, you create stubs and skeletons.

interface Stock {
    int getQuote( in string company);
};

public class StockImpl extends StockPOA {
  public int getQuote(String company) {
     //forward a call to MBean here
  }
}

CORBA. - :

org.omg.CORBA.ORB orb = org.omg.CORBA.ORB.init(...);
org.omg.PortableServer.POA poa = org.omg.PortableServer.POAHelper.narrow(orb.resolve_initial_references("RootPOA"));

poa.the_POAManager().activate();

NamingContextExt nc = NamingContextExtHelper.narrow(orb.resolve_initial_references("NameService"));

NameComponent [] name = new NameComponent[1];

org.omg.CORBA.Object o = poa.servant_to_reference( new StockImpl(orb,poa));
name[0] = new NameComponent( "Stock", "server");
nc.bind(name, o);

orb.run();

NamingService CORBA.

CORBA JBOSS.

+3
+1

Source: https://habr.com/ru/post/1794172/


All Articles