Setting QAnywhere manager configuration properties in a file

Note

You can create or open a QAnywhere manager configuration file in Sybase Central. From the QAnywhere plug-in task pane, choose Create An Agent Configuration File. When you have chosen a file name and location, the Properties window for the configuration file opens, where you can set the properties.

The information in a QAnywhere manager properties file is specific to one instance of a QAManager.

When using a properties file, it must be configured for and installed on the remote device with each deployed copy of your application.

For information about specifying the name of the property file, see:

If the properties file does not reside in the same directory as your client executable, you must also specify the absolute path. If you want to use the default settings for the properties, use null instead of a file name.

Values set in the file permit you to enable or disable some of the QAnywhere features, such as automatic message compression and logging.

Entries in a QAnywhere manager configuration properties file take the form name=value. For a list of property names, see QAnywhere manager configuration properties. If value has spaces, enclose it in double-quotes. Comment lines start with #. For example:

# contents of QAnywhere manager configuration properties file
LOG_FILE=.\sender.ini.txt
# A comment
CONNECT_PARAMS=eng=qanywhere;uid=ml_qa_user;pwd=qanywhere
DATABASE_TYPE=sqlanywhere
MAX_IN_MEMORY_MESSAGE_SIZE=2048
COMPRESSION_LEVEL=0
Referencing the configuration file

Suppose you have a QAnywhere manager configuration properties file called mymanager.props with the following content:

COMPRESSION_LEVEL=9
CONNECT_PARMS=DBF=mystore.db

When you create QAManager, you reference the file by name.

Following is an example using C#:

QAManager     mgr;
mgr = QAManagerFactory.Instance.CreateQAManager( “mymanager.props” );
mgr.Open( AcknowledgeMode.EXPLICIT_ACKNOWLEDGEMENT );

For the .NET API, see QAManager interface and QAManagerFactory class.

Following is an example using C++:

QAManagerFactory *  qa_factory;
QAManager *    mgr;
qa_factory = QAnywhereFactory_init();
mgr = qa_factory->createQAManager( “mymanager.props” );
mgr->open( AcknowledgementMode::EXPLICIT_ACKNOWLEDGEMENT );

For the C++ API, see QAManager class and QAManagerFactory class.

Following is an example using Java:

QAManager mgr;
mgr = QAManagerFactory.getInstance().createQAManager("mymanager.props");
mgr.open( AcknowledgementMode.EXPLICIT_ACKNOWLEDGEMENT );

For the Java API, see Class QAManagerFactory and Interface QAManager.