Developers: Guidelines for Clients and Adapters

Home
Documentation
Library
Sample Code and Applications
FAQs
Articles
Community
Training
Download Center
Contact DevZone

Printer Friendly

Frequently Asked Questions

Guidelines for Clients and Adapters

Note: Differences between the Developer and Enterprise Editions are listed here.


 

In my client program, can I reuse Schema.Field objects across tuples?

No - as a general rule, you can't reuse tuples that were created from separate schema objects.  In fact, you also cannot reuse Schema.Field objects. You need to "re-get" the Schema.Field objects after Schema creation.

If you try to do these, you'll see an ArrayIndexOutOfBoundsException thrown by the StreamBase client libarary.

Applicable To: StreamBase 3.5, 3.7, 5.0
October 15, 2007


 

How do I increase log data from the JDBC adapter?

To get more log data from the JDBC adapter, edit lib\sb-jdbc.ini in your adapter's installation directory. Set the JDBC adapter log level by defining the log level and specifying the log file that you want created. In the Java Runtime Environment section of the file, add lines similar to the following:

VM Arg=-Dstreambase.log-level=2
VM Arg=-Dstreambase.logfile=somefile

Applicable To: StreamBase 3.5, 3.7
September 22, 2006



Is the EMS adapter JMS-compliant?

Yes, it is.

Applicable To: StreamBase 3.5, 3.7, 5.0
September 22, 2006



How do I correct problems with Bools in Excel CSV files?

If you work in Excel with a CSV file that contains Bools, Excel uppercases the Bools, interpreting them as the built-in functions TRUE() and FALSE(). This cannot be changed by using either a retype or find/replace. However, the application expects lowercase true and false, and throws an exception if the uppercase tokens are passed.

Workaround: After you finish working in Excel, save the file, close Excel, and open the CSV file in a text editor. Replace TRUE with true and FALSE with false.

Applicable To: StreamBase 3.5, 3.7
September 22, 2006


 

Is the data sent from StreamBase Client to the Server application encrypted? If so, can that feature be turned off?

In versions 3.5 and 3.7, StreamBase data is not encrypted. StreamBase 5.0 introduces optional SSL encryption of network traffic. See the Administration Guide for information on how to configure this option. Note that encryption and decryption will impact application performance.

Applicable To: StreamBase 3.5, 3.7, 5.0
September 22, 2006



How do I synchronize startup of clients?

Dequeuer clients only receive tuples that are emitted by an OutputStream for the period during which the client is subscribed to the OutputStream. The suggested order of startup is as follows:

  1. Start StreamBase server
  2. Start enqueue client
  3. Enqueue client subscribes to special output stream
  4. Start dequeue client
  5. Dequeue client subscribes to output streams
  6. Dequeue client writes a tuple to a special input stream
  7. Tuple flows from special input to special output stream
  8. Enqueue client reads tuple
  9. Enqueue client starts sending data

Applicable To: StreamBase 3.5, 3.7
May 23, 2006


 

How do I use the StreamBase adapter for Excel?

  • This functionality uses the Microsoft RTD API.
  • The RTD requires Excel 2002 or later.
  • A few of the newer APIs required by the StreamBase Excel adapter are not supported by the version of dbghelp.dll that exists on some older systems, such as Windows 2000.
  • The adapter validates all UNIREF parameter values, even those that are not accessed.

Applicable To: StreamBase 3.5, 3.7
May 23, 2006


 

Can clients enqueue from different threads in the same client process?

The StreamBaseClient class is single-threaded, which means that you cannot simultaneously use a particular StreamBaseClient instance concurrently from multiple threads. However, you may create and use separate StreamBaseClient objects in separate threads, provided that no two threads are using the same StreamBaseClient concurrently.

For instance, you could share a StreamBaseClient across any number of threads as long as you guard the StreamBaseClient object with a mutex. That is, you must have each thread allocate the mutex before performing any operation on the object. Or you could give each thread its own StreamBaseClient.

For essential reference information about threading in clients, please see the Class StreamBaseClient topic in the Java API reference documentation.

Applicable To: StreamBase 3.5, 3.7
August 6, 2006


 

How do I use dequeue() correctly in clients?

In writing clients, remember that dequeue() is a blocking call. Below are a few ways to ensure that your client won't wait forever:

  • The Java client API has a canDequeue() method which will tell you if you can dequeue without blocking.
  • The enqueuer could send a special marker tuple as EOT.
  • A metronome could generate a marker tuple.

Applicable To: StreamBase 3.5, 3.7
May 23, 2006


 

How do I handle DequeueResult?

  • DequeueResult is a list of tuples, not a single tuple.
  • The reuseTuple() method on the DequeueResult creates a member variable with a cached tuple. Hence, you need to invoke it only once for a DequeueResult, not on each tuple. Invoke reuseTuple() before iterating through the DequeueResult.

Applicable To: StreamBase 3.5, 3.7
May 23, 2006


 

Can I use inter-stream ordering on multiple streams?

Inter-stream ordering is not guaranteed when a client enqueues on multiple streams.

Applicable To: StreamBase 3.5, 3.7
May 23, 2006


 

Does each dequeue need a separate client?

You do not need a separate client for each dequeue, unless the dequeue is done from separate threads.

Applicable To: StreamBase 3.5, 3.7
May 23, 2006


 

How should I close client connections?

The client must call the close() method when done. The close() method may throw a StreamBaseException if one was pending from a prior operation. This exception should be caught, but may be ignored.

For example, if the client encounters a disconnect exception, it should close() the current connection before attempting to reconnect. In addition, the old object is no longer valid and a new object must be created.

Applicable To: StreamBase 3.5, 3.7
May 23, 2006

 

When do I need to update custom clients and adapters?

Custom-written clients and adapters must be rebuilt for each release. The internal version number of the client or adapter must match the server version number for handshake.

Applicable To: StreamBase 3.5, 3.7
May 23, 2006


  
How do I install the Excel adapter on Windows 2000?

You can install the Excel adapter on a Windows 2000 system without having StreamBase installed:

  1. Create the directory into which the Excel adapter binaries will be installed, typically C:\Program Files\StreamBase Systems\StreamBase\bin.
  2. Copy exceladapter-standalone.zip to that directory.
  3. Extract the three attached files.
    Note that dbghelp.dll is required only when installing on Windows 2000. The other two are required for both Windows 2000 and Windows XP if StreamBase is not installed.
  4. Run the installation for the Excel adapter.

Note: Before running Excel with the adapter, you must edit the adapter's configuration file to point to a remote StreamBase server, as described in the Help topic, External Adapter for Microsoft Excel.

Applicable To: StreamBase 3.5, 3.7
September 22, 2006