Frequently Asked Questions

How do I run the UI Engine as an applet?

When you want to run the ULC UI Engine as an applet you need a browser with JDK 1.1 support. You can verify that the browser opens the applet successfully by opening the Java Console. If your browser doesn't have the required JDK 1.1 support the console will show a corresponding exception.

If you have no such browser available you can still run the UI Engine using the Java Runtime Environment (JRE) and in this case no HTML browser is needed. (See: Release Notes and Web Integration)

How do I increase the Environment under Win95?

On some Win95 machines you may get the message "Out of environment space" when starting a ULC application.
The fix is to ensure that your environment is large enough. Under Win95 the environment is set by adding/editing the entry Shell in the file c:\Config.sys.
Add/Edit the entry to be:


Here the number following /E: specifies the maximum size of the environment.
Ensure that the path c:\win95\ is a valid path on your machine.

How do I run ULC on a standalone machine?

The easiest way is to go into the DNS page of the TCP/IP bindings(eg. Control Panel -> Network ->"TCP/IP->Dial-up Adaptor") and set your host name to "localhost". You will want to reset it when you connect back to a network, though.
A very useful shareware utility to switch configurations on Windows based machines is NetSwitcher.
Another way that has been successful is to do the following:

  1. Install ULC
  2. Install TCPIP on your machine.
    • Win95
      • Go to Network in your Control Panel,
      • Choose Configuration and click Add.
      • Now choose Protocol and select Microsoft as the Manufacturer.
      • In the right hand pane choose TCP/IP.
    • WinNT
      • Go to Network in your Control Panel,
      • Choose Protocols and click Add.
      • Choose TCP/IP.
  3. After the above steps reboot your machine.
  4. Use localhost or as the hostName when forming a URL.

Note: On machines that are sometimes connected to the network and other times not, the following have been found to help with varied degrees of success on different machines.

  • Leave the network card plugged in even if not connected to the network.

  • Enable DNS lookup but leave the list of DNS servers empty.

We will update this FAQ as soon as we get a more definite solution to this problem.

How can I request a remote ULC server to exit?

After ULC R1.3 onwards all ULC server applications interpret a connection request with the application name EXIT to mean that the server itself should exit.Hooks are provided in both Java and Smalltalk for the application to override the default behavior which is to do a System.exit immediately.It is up to the application developer to decide what actions should be performed when this EXIT request is received.

For example if you have started a ULC application on your local machine as a server on port 4444.Starting the UI Engine with the parameter-url ulc://localhost:4444/EXIT will cause the ULC application server to exit immediately.

To change the default behavior, in Java the developer must override the handleExitRequest method on ULCContext and in Smalltalk the developer must register for the event using the ulcWhenAboutToTerminateSend: API in UlcSystem

How much code is downloaded when connecting to a ULC application?

The typical mode for running ULC applications is where the UI Engine is run as a client on the users machine and the ULC application is running on an application server. In this mode the primary concern for the user will be how much code needs to be downloaded to his machine before a connection to an ULC application is made.Assuming that the user has installed the Swing classes locally on his machine (this is a one time installation process)` then the only code that needs to be downloaded is the UI Engine. The UI Engine is packaged as a single .jar file and is approximately 440KB in size which allows even slow modem connections to perform satisfactorily.

What kind of applications is ULC designed for?

The strength of applications built using ULC technology are that they can be distributed easily, are automatically web enabled and have very low bandwidth requirements. On every release of ULC we are adding new widgets and capabilities but the primary focus of ULC has been to support the requirements of commercial business applications.

How can I convert my standalone application to a ULC server application?

The problems of converting a standalone application to a ULC server application are mostly the same faced by any server developer.
The key areas that need to be looked at are:

  1. As far as possible remove references to global/class variables etc.
    If you have to use globals ensure that the access to them is restricted to a well defined path. You will also need to protect the access to these kinds of variables to ensure that they are thread safe.

  2. Be aware of the thread un-safe areas of your environment.

  3. In most cases an Application Context object will need to be introduced to represent the active connection/user that is associated with each running instance of the application. Each running ULC application needs to be able to identify its Application Context. One way to achieve this is to maintain a table keyed on the ULCContext instance.

  4. Be aware that the user interface of your application can now be running remotely. Use the ULC provided enablers/Remote Models/Notification policies etc. to reduce traffic between the application and UI Engine.

What happens when a connection fails?

The behavior of the ULC application when a connection fails depends on whether the application is in client or server mode.

  • Server mode.
    The application just terminates since currently there is no mechanism in place to identify the remote user when the connection is restored and to associate it with a previously running instance of the application. This has been changed for ULC ST with this release.
  • Client mode.
    In client mode the behavior is as follows:
    • Java
      In the Java ULCContext if the auto reconnect flag is set (default is true) then the application instance will retry the connection until the connection is reestablished.
      If the reconnect flag has been set to false then the application will be terminated as soon as the connection goes down.
    • Smalltalk
      In Smalltalk the value of ULCSystem.connectionRetries controls the application reconnect behavior.
      If connectionRetries=0 then the application terminates immediately.
      If connectionRetries=-1 then the connection will be retried forever.
      If connectionRetries>0 then the connection will be retried the specified number of times.

Why do I get an error "ULC Transport Unable to load defaults"?

When attempting to connect a ULC application to a UI Engine on some platforms if the DNS entry of the target machine does not match its configured IP address an error is reported on the Console stating "ULC Transport Unable to load defaults". The fix for this problem is to either correct the DNS entry or add an entry in the HOSTS file with the current IP address of the target machine.

Why am I not able to connect a sample ULC application to a UIEngine on the same machine?

On some platforms the local loopback interface is not enabled by default in the TCPIP settings.
From a command prompt type "ping" as well as "ping localhost". If a reply is not received your machine does not have the local loopback interface enabled.

  • Windows
    Under Windows 95/98/NT this interface is enabled by default no further configuration is needed.
  • OS2
    Under OS2 start the tcpcfg program and select the loopback interface and choose the Enable Interface option.
  • Other platforms
    Contact your network administrator for help.

In ULC lists (Table, TreeTable), how is addPreloadColumns different from addPreloadAttributes?

  • addPreloadColumn(attributeName) :
    addPreloadColumn(attributeName) or preload(String attributeName) API on the ULCAbstractTableModel is used for ensuring that all the data for the column associated with the given attributeName, is uploaded to the UI at startup. This feature is useful for widgets such as the ComboBox, which (typically) have a small number of rows.Since this API precludes any lazy-loading of data for the given column, it is not advisable to use this API on table or tree widgets.

  • addPreloadAttribute(attributeName) :
    this API on ULCAbstractModel ensures that the attributes for the given name are uploaded each time that row (oid) is uploaded. The oid's themselves are still lazily loaded, but since the attribute always accompanies the oid, one round-trip is saved. On the down side, setting this preload attribute means higher traffic between the ULC and the UI, since this attribute will get updated even if it has not changed.

What can I do to tune the performance of my ULC List widgets (Tree, Table, TreeTable) ?

  • Using addPreloadAttributes on the treeColumn
    If you know for sure, that your tree column is always visible, you can optimize the loading of this column by setting it's attribute to be preloaded.

  • notifyAdd vis-a-vis notifyChange
    If you are inserting a large number of rows dynamically into a treeTable or a tree, it is more efficient to use the notifyChange API rather than the notifyAdd API on the ULCAbstractTableModel. The down side is that a reload results in the current selection getting lost.

My long running ULC Java server seems to be leaking memory. What can I do?

When a ULC Java application terminates the free method is called on all ULC Java Proxy parts. In some cases classes that are built using the ULC Java Builder have references to other parts that prevent them from being garbage collected. You can optionally implement the method free on all subclasses of ULCVajContext, ULCShell and ULCVajComposite to reset any instance variables and other data structures.

Note: Ensure that if you do implement the free method that you call within your implementation.
In addition the ULCShell implements the API setDestroyOnClose(boolean) set this value to true on those ULCShells that can safely be destroyed when they are closed.

Why is the slider or combobox part disabled?

If a model is connected then the part expects from the model to have a correct/initial value at the slot of the form attribute for the part. If this value is undefined ( null/nil) then the part is disabled. If the programmer intends to use the part for inputting data then the form model should be initialized to some useful default. Another solution is to enable the part manually.

The End