37.2. Access a WebLogic Server's EJB from a JOnAS EJB using RMI-IIOP

37.2.1. WebLogic Configuration

No modification to the EJB code is necessary. However, to deploy the EJB for use with the iiop protocol, add the element iiop="true" on the wlappc task when creating the build.xml. For example:

wlappc debug="${debug}" source="ejb.jar" iiop="true" 
  classpath="${class.path}"

37.2.2. EJB Proxy on JOnAS

To call an EJB deployed on WebLogic Server that is accessible through RMI-IIOP, specify the JNDI URL of the server name containing the EJB to call. This URL is of the iiop://server:port type. For example:

 
try {
   Properties h = new Properties();
   h.put(Context.PROVIDER_URL, "iiop://server:port");
   ctx=new InitialContext(h);
   }
catch (Exception e) {
    ...
}

Then, the EJB deployed on WebLogic Server is accessed in the standard way.