Make it better. Make it faster. Make it CORBA. (by John McHugh)
Guy-Manuel de Homem-Christo and Thomas Bangalter. You may not recognise the names, but you most likely know them by their other name. They emerged on the music scene in 1993 (the same year we first released Orbix) and have been behind a huge number of worldwide hits. One of those songs, “Harder, Better, Faster, Stronger,” was recently performed on German TV by a 15 piece orchestra. The song contains lyrics such as "Work it harder / Make it better / Do it faster / Makes us stronger / More than ever... Our work is never over.”
As a Product Manager, one of my responsibilities is to understand customer and market requirements and ensure these feed directly into our product strategy. These lyrics remind me of the input we probably all get at one time or another from our peers, bosses or family members. Okay, not quite as generic as "make it better" or "faster", but sometimes the important details behind the request get lost along the way and what ends up being finally communicated is not much more than asking for a general improvement in a general area without a specific target or measurement in mind.
Here at Micro Focus we are committed to evolving our solutions and delivering products that meet the needs of our users. We have a very strong and proven heritage in ensuring our customers get the maximum value from their existing investments. Our motto of “Bridging the old to the new” is central to everything we do. This is especially true with our portfolio of CORBA solutions. Our philosophy requires collecting good quality feedback directly from our users and ensuring our product strategy matches the expectations of our customers.
To help achieve this, we ask for your help. Just launched is the 2017 Micro Focus CORBA User Survey, a wide ranging examination of how we can better meet your future needs. This survey is focused on understanding how you use our products, and how we can develop those products in today's changing landscape of Cloud, DevOps and IoT. We understand your time is precious, so while it should take under 10 minutes to provide your feedback, everyone who completes the survey will be entered for a chance to win one of several $25 Amazon gift cards.
Oh, and if you are still wondering who the two gentlemen I mentioned at the start of the post are... they form the electronic musical duo, Daft Punk.
Interestingly enough, this has been raised countless time -- How to start a VisiBroker application with pure java launcher?
Quick answer: set the correct Classpath and necessary properties
The most common way to start VisiBroker application is using vbj native launcher. In fact, quite a lot of tools or services in VisiBroker are implemented in Java programming language (e.g. all the idl compilers, NamingService, Gatekeeper, etc.) -- when you look inside $VBROKERDIR/bin, those programs are distributed as native executable, which are simply wrappers around Java launcher. Additionally, the wrappers will load properties defined in the corresponding configuration file. By opening vbj.config file, one can tell all the necessary information required to start a VisiBroker application.
Classpath and Properties
Classpath: Besides the obvious classpathes (i.e. core lib -- vbjorb.jar; license modules -- lm.jar and sanct6.jar; optionally, vbsec.jar -- if Security Service is used, etc.), one also needs to point the endorsed lib path to JVM -- java.endorsed.dirs=$VBROKERDIR/lib/endorsed for updated API definitions from omg. (endorsed lib is the standard override mechanism in JVM to incorporate newer versions of standards created outside of JCP. In VisiBroker's case, it's OMG specifications.) If you don't set it correctly, you might encounter errors like NoSuchMethodError reporting on certain OMG classes.
Properties: there are 3 groups of properties:
ORB implementation plug-in properties
These 2 properties are used by JVM to dynamically load ORB implementation during run time.
These properties are used by JVM to load RMI-IIOP implementation at the run time.
NOTE: These 2 have to be set at the system level (i.e. System.setProperties(...)) before the ORB is initialized.
Given that, you can either start VisiBroker application with java -D[name]=[value] for all above settings, i.e. java -Djava.endorsed.dirs=$VBROKERDIR/lib/endorsed -Djavax.rmi.CORBA.StubClass=com.inprise.vbroker.rmi.CORBA.StubImpl -Djavax.rmi.CORBA.UtilClass=com.inprise.vbroker.rmi.CORBA.UtilImpl -Djavax.rmi.CORBA.PortableRemoteObjectClass=com.inprise.vbroker.rmi.CORBA.PortableRemoteObjectImpl -Dorg.omg.CORBA.ORBClass=com.inprise.vbroker.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=com.inprise.vbroker.orb.ORBSingleton -Dborland.enterprise.licenseDir=$VBROKERDIR/var -Dborland.enterprise.licenseDefaultDir=$VBROKERDIR/license ...
( this is pretty similar to the output given by running the command "vbj -javacmd ...")
or you can embed these settings inside your code, like this
... // Set License Properties -- not necessary if it's a pure CORBA client application System.setProperty("borland.enterprise.licenseDir", "C:\\MicroFocus\\VisiBroker85\\var"); System.setProperty("borland.enterprise.licenseDefaultDir", "C:\\MicroFocus\\VisiBroker85\\license");
java.util.Properties props = new java.util.Properties (); // For ORB props.put("org.omg.CORBA.ORBClass", "com.inprise.vbroker.orb.ORB"); props.put("org.omg.CORBA.ORBSingletonClass", "com.inprise.vbroker.orb.ORBSingleton");
// FOR RMI-IIOP -- not necessary if it's a pure CORBA application props.put("javax.rmi.CORBA.StubClass", "com.inprise.vbroker.rmi.CORBA.StubImpl"); props.put("javax.rmi.CORBA.UtilClass", "com.inprise.vbroker.rmi.CORBA.UtilImpl"); props.put("javax.rmi.CORBA.PortableRemoteObjectClass", "com.inprise.vbroker.rmi.CORBA.PortableRemoteObjectImpl");
The implications of setting the properties incorrectly can be hidden and may remain unnoticed for long time -- for instance, some customers encountered problems when incorrectly setting both ORBClass and ORBSingletonClass to com.inprise.vbroker.orb.ORB, which leads to some misleading NPE exception with stack trace like this: ... com.inprise.vbroker.Logging.LogRegistry.initProperties com.inprise.vbroker.Logging.LogRegistry.<init> com.inprise.vbroker.orb.ORB.getRegistry com.inprise.vbroker.orb.CDROutputStream.setup com.inprise.vbroker.orb.CDROutputStream.<init> com.inprise.vbroker.orb.ORBSingleton.create_cdr_output_stream ... Of course, this will be fixed in future release -- at the meantime, make sure your settings are correct