The J-Integra® Espresso API provides a CORBA ORB implementation for the .NET platform.
| Namespace | Description |
|---|---|
| Ics | The Ics Namespace provides a managed Corba implementation. |
New Namespaces added:
| Namespace | Description |
|---|---|
| Ics.J2EE | Provides a set of Java like Context APIs for developers who do not want to worry about programming with CORBA specific APIs. Developers can quickly connect to the application server of their choice and can program directly with Remote interfaces and not worry about "narrowing" or initializing the orb etc. |
| Ics.Runtime | Provides a class and enumerations for setting up the CORBA Runtime environment. |
Provides a simple and easy way for developers to connect with a variety of different application servers. Out of the box support exists for:
To attach to another Application Server/CORBA Naming service, just call the
SetNamingServiceURI and enter the corbaloc where the Naming Service
resides. Note: The runtime is smart enough to figure out if a SSL/TLS session
is required based upon the corbaloc URI.
1. To connect to Weblogic, on machine X, using TLS, with no certificate
validation:
J2eeQuickConfig qc = new J2eeQuickConfig(ApplicationServer.WEBLOGIC,
"machineX");
qc.UseSecureConnection(SecureConnectionType.TLS);
J2eeEasyContext.Init(qc);
2. To connect to Generic Sun RMI-IIOP on localhost:
J2eeQuickConfig qc = new
J2eeQuickConfig(ApplicationServer.SUN_JDK_RMI_IIOP);
J2eeEasyContext.Init(qc);
3. To connect to CORBA Naming Service with a corbaloc of corbaloc:iiop:1.2@machineX:2345/SomePath/NamingService
:
J2eeQuickConfig qc = new J2eeQuickConfig();
qc.SetNamingServiceURI("corbaloc:iiop:1.2@machineX:2345/SomePath/NamingService");
J2eeEasyContext.Init(qc);
4. To connect to Weblogic, on machine X, using JDK1.5, using SSL, with some
advanced options:
J2eeQuickConfig qc = new J2eeQuickConfig(ApplicationServer.WEBLOGIC,
"machineX");
qc.SetTargetJavaVersion(JavaVersion.JDK_150);
qc.UseSecureConnection(SecureConnectionType.SSL);
qc.SetApplicationLog(OrbErrorLevel.ERRORS, "MyLog", false);
J2eeAdvancedOptions ao = new J2eeAdvancedOptions();
ao.SetMutualAuthentication(true);
ao.SetThreadPoolSize(25);
qc.SetAdvancedOption(ao);
J2eeEasyContext.Init(qc);
5. To use configuration file to initialize J2eeEasyContext:
* Runtime will
search and load the default configuration file at the application directory,
default configuration file's name is application_name.config
J2eeEasyContext.Init();
* Sample configuration file (using Weblogic, on machine X, port 1234, using TLS):
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="Jintegra"
type="Ics.Config.JintegraConfigHandler, Jintegra.Espresso, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=f1aa1bb10d3603d9"/>
</configSections>
<Jintegra>
<J2EEConfig>
<ApplicationServer>
<type>Weblogic</type>
<host>machineX</host>
<port>1234</port>
</ApplicationServer>
<Security>
<secureConnectionType>TLS</secureConnectionType>
</Security>
</J2EEConfig>
</Jintegra>
</configuration>
1. Connect to Naming service on host machine x, plus set some runtime
parameters:
RuntimeConfiguration rc = new RuntimeConfiguration();
// Set URI of Naming Service. Naming Service is on machine_X, port 6578
rc.SetNamingServiceInitialReference("corbaloc:iiop:1.2@machine_X:6578/SomeNameService");
// Set up Application log, errors only with a name of "mylog"
rc.SetApplicationLog(OrbErrorLevel.ERRORS, "mylog");
// Set up per object connection
rc.SetClientConnectionType(ClientConnectionType.PER_OBJECT);
// Create 50 Server (listening) threads
rc.SetThreadPoolSize(50);
ORB orb = Ics.CORBA._ORB.init(rc);
2. Set up secure mutually authenticated session to BEA Weblogic:
RuntimeConfiguration rc = new RuntimeConfiguration();
// Set URI of Naming Service. Naming Service is on machine_X, port 6578
rc.SetNamingServiceInitialReference("corbaloc:tlsiop:1.2@machine_X:7002/NameService");
// Set connection Type
rc.SetConnnectionType(ConnectionType.TLS);
// Set mutual authentication
rc.SetMutualAuthentication(true);
// Set certificate key store to use
rc.SetCertificateKeyStore("MyCustomStore");
ORB orb = Ics.CORBA._ORB.init(rc);
3. Using pure Corba to talk with mutual Authentication to a Weblogic
appserver:
RuntimeConfiguration rc = new RuntimeConfiguration();
rc.SetNamingServiceInitialReference("corbaloc:tlsiop:1.2@machine_X:7002/NameService");
rc.StartEmbeddedNameService(true);
rc.SetMutualAuthentication(true);
rc.SetThreadPoolSize(25);
rc.SetApplicationLog(OrbErrorLevel.ERRORS, "MyLog", false);
rc.SetTargetJavaVersion(JavaVersion.JDK_150);
Ics.CORBA.ORB orb = Ics.CORBA._ORB.init(rc);