For J2EE developers, VisiBroker for .NET supports an equivalent ORB initialization API using J2EE.Naming.InitialContext(). For example, suppose your J2EE server is running on the local host with a Naming Service listening to port 2809. Your client can use the
-ORBInitRef style initialization to point to the Naming Service as follows:
You can store VisiBroker for .NET properties in a System.Collections.Hashtable object, and pass these to either
CORBA.ORB.Init(),
J2EE.Naming.InitialContext(), or
Janeva.Remoting.IiopChannel(). This provides a cleaner approach to setting VisiBroker for .NET properties than the command-line approach and is useful when the command-line is not available.
The .NET Remoting developer may pass the Hashtable settings into the appropriate version of the
Janeva.Remoting.IiopChannel constructor:
The following CORBA example creates a Hashtable object and sets three properties:
For J2EE developers, you may also use a Hashtable to initialize the application:
Notice that all of the VisiBroker for .NET settings are grouped under the <visinet> section in the configuration file. Since the VisiBroker for .NET settings are not part of the standard .NET configuration XML, it is important to instruct the .NET runtime to read the
<visinet> XML. This is achieved by adding the
<configSections> section as it is demonstrated in the example above.
The following example sets the janeva.license.dir property in a configuration file.
Set this property to true to enable support of the client-demarcated transactions. Keep in mind that it is impossible to start a new transaction without turning this feature on. Namely, the
orb.ResolveInitialReferences("TransactionCurrent") call will fail if transactions are not enabled.
If the <transactions> section is present in the configuration file, and the
enabled attribute is missing, the default VisiBroker for .NET behavior is to enable transactions.
The following example sets the janeva.server.port and the
janeva.server.remoting properties in a configuration file.
The following example sets the janeva.interop.jvmType property in a configuration file.
Set this property to true to enable VisiBroker for .NET security support.
If the <security> section is present in the configuration file, and the
enabled attribute is missing, the default VisiBroker for .NET behavior is to enable security.
The following example sets the janeva.security.username,
janeva.security.password and
janeva.security.realm properties for the security identity in a configuration file.
The following example sets the janeva.security.certificate property for the security identity in a configuration file.
Set this property to true to enable VisiBroker for .NET server-side security support.
If the <security><server> section is present in the configuration file, and the
enabled attribute is missing, the default VisiBroker for .NET behavior is to enable server-side security.
If the <firewall> section is present in the configuration file, and the
enabled attribute is missing, the default VisiBroker for .NET behavior is to enable the firewall.
The following example sets the janeva.firewall property in a configuration file.
The following example sets the janeva.orb.init property in a configuration file.