Borland®
Shop
Products Downloads Services Support Partners News & Events Company Community
AppCenter
Documentation
Support
 APPCENTER
AppCenter V1.6 Frequently Asked Questions

This document provides answers to frequently asked questions about AppCenter. Most of these questions are also addressed, though possibly not as explicitly, in the AppCenter documentation.

FAQ contents

  1. Creating configurations
  2. Scaling applications
  3. AppCenter operations
  4. Using cockpits
  5. Using events and actions
  6. The AppCenter API
  7. AppCenter administration
  8. Environment variables
  9. Using Java VisiBroker servers
  10. Miscellaneous

1. Creating configurations

Q: Why doesn't Caps Lock work in the password box on login?

A: Java currently doesn't recognise the Caps Lock key. The work around is to use the Shift key.

Q: Can dependencies span across configurations. That is, can Object X in configuration A be dependent on Object Y in configuration B?

A: Yes. However, while dependencies are enforced, they are not acted upon across configurations. In other words, a particular configuration can view objects outside its own configuration, but can NOT effect objects outside its configuration.

Q: Do I need to run an agent on a machine that only runs an AppCenter viewer?

A: No. An agent is required on any machine that hosts any AppCenter core component or an object that is managed by AppCenter. A machine that only hosts a viewer does not need it.

Q: I can import VisiBroker objects from the Location Service. How can I set up their services?

A: This is done with the VisiBroker wizard. Select the object in AppCenter and invoke the wizard from the context menu. You can then edit it as you require.

Q: I can import VisiBroker servers that have been registered with the OAD. However, I don't see a wizard to convert such servers to AppCenter control. Are there a few properties I can edit to effect that conversion, or do I use the VisiBroker server wizard?

A: If you import the server from the OAD, then you should use the update wizard to change the things you want.

Q: Is it possible to have more than one modelled view of an application? For example, can you model the same running application but group it by server type, or by host, and be able to drill down that way?

A: The problem with this is that at the moment, grouping in AppCenter is more than just a logical way to group things; it has semantic meaning to the rules processing engine. It actually governs what objects get started and when. There is a workaround. You may be able to get some of what you want by putting specific servers onto a number of different cockpits, with each cockpit representing a particular "slice" of the system. Note that there are a number of host-centric views, both within a configuration, and across multiple configurations.

Q: What is the best way to wait for a group of CORBA servers to start up? I realise I can wait on their group, but after these servers are launched, they will create some CORBA objects & send the object IOR's to a database interface. They aren't really ready until they have completed all of that activity.

A. Define an object associated with each server. In each server, don't put that object into the location service until the server has started up completely. When you manage that object in AppCenter, set the ping after death flag so it will ping the object even when it is down. Then depend the other things on the object being up. The object will be down to start with and come up after all of the required actions have happened. Then all the dependent objects will start.

Q: Can I include the VisiBroker for C++ orb library in a DLL?

A: You should not need to do this. Use the DevKit interface to allow a process on any host to communicate with AppCenter Just set BROKER_HOST and BROKER_PORT appropriately.

Q: What is the best way to maintain application level state information in AppCenter so that CORBA server components can look it up? For example, suppose that an application has 5 stages: startup, initialisation, running, shutting down and cleanup. I want to post a string (or an object) somewhere & allow the servers in the application to query for this state information, perhaps to gate internal state transitions in the servers.

A: Create a template with some properties in it. Associate that template with a configuration or an object (as appropriate). Then use the C/Corba API to set and get the values of the properties. You could also use some middleware persistence mechanism for doing this sort of thing. If all servers run in JVM's, consider using Javaspaces.

Q: Why don't VisiBroker objects appear below their containing servers in the navigator.

A: There are two types of containment, only one of which can be represented on the navigator. The type of containment displayed on the navigator indicates containment where an object can only be in an up state when the requisite number of objects that are contained by it are up. VisiBroker objects do not necessarily have this requirement. For example, it may be sufficient that a VisiBroker server be available, not running, for the object that contains it to be considered up.

Q: I created a Java server with performance statistics on and it couldn't start the server. When I manually run the command that is listed in the properties in a command window it works fine. Do I need VBMonitor.jar in the system classpath?

A: You should not have to have it in the system classpath - as long as it gets on the classpath somehow, that's all you need. You can explicitly put it on the command line, for example.

Q: I'm having trouble setting a property for an object. I can add it to a template, so why can't I add one to an object in the configuration ?

A: It is not possible to create a new property at the object level. The reason for this is that a property consists of two types of information - data, and meta-data. The data is basically the name and value. The meta-data includes descriptive text, type information, a number of attribute bits, allowed values, and so on. Meta-data can only be stored in templates, while objects themselves only contain data. To solve your problem, just put the property in the default object or server template - it will automatically be inherited each time you create a new one.

2. Scaling applications

Q: Can you reconfigure a group in real time. For example, if a group has three servers, can I add a fourth server, start it up and then shut down server #1?

A: Yes. But you have to first execute a "Reload" option on the configuration. This currently has a side effect in that it changes the state of all down servers back to idle. This is a known bug. To add a server:

1) Use the Viewer to add the server.

2) Right click on the configuration and select the reload action. This will tell the monitor process that changes have been made to an active configuration and that it should now take note of these changes.

3) Once the new server is under management (that is, idle in this case), you can shut down server1 and server 4 will start up.

Q: If I associate two event actions with a filter, why won't the second happen until the first is finished?

A: The action associated with an event should be fairly short-lived, for example a script which sends an e-mail, or takes some sort of corrective action. If you are running something long lived, you should launch as a separate process such as a .bat file and let the original script finish on its own.

Q: Is it possible to have a number of concurrent managed environments on the same host?

A: The thing to remember about this is that you can have only have one agent talk to one broker on the same machine. You can run multiple brokers (on different ports) and have different agents talk to each of these brokers. It would be a matter of setting BROKER_HOST and BROKER_PORT for each environment.

Q:I have a number of processes that require being started as part of a configuration and that must be run with different user logins. How do I manage this in AppCenter?

A: The easiest way to do this is to have the processes that need to run under a different user set the user id bit. As long as the AppCenter agent has permission to execute these programs you should get the required functionality.

Q: How do I facilitate communication between VisiBroker clients and OpenView?

A: The best way to communicate to OpenView is via a standard protocol called SNMP. There are many SNMP packages available on the market. Any of these packages would allow you to programatically send SNMP traps (or events if you like) to OpenView. Also, VisiBroker processes can send user defined events to AppCenter, which can send them on to OpenView as required. It should be noted however that SNMP does not provide a great deal of security unless you are using version 3.

Q: Can a computer with multiple IP cards run as a multiple host?

A: Yes it can. In order to get the dual IP address setup to work, set the environment variable AM_HOST_NAME to the IP address of the interface you want to use. You can set BROKER_HOST on each machine to the correct ip address as well. BROKER_HOST can take an IP address as well as a name. AM_HOST_NAME can take an IP address as well as a name. For example: On main machine (with two interfaces 1.1.1.1 and 2.2.2.2) you want to use 1.1.1.1, so set AM_HOST_NAME on that machine to 1.1.1.1 set BROKER_HOST to 1.1.1.1 on that machine then, start the broker, database and agent. On all other machines set BROKER_HOST to be 1.1.1.1 and set AM_HOST_NAME to the interface they want to use on that machine (if there are two).

AM_HOST_NAME is the IP or hostname of the current machine. This is used when the current machine has got more than one hostname (or IP address) and you need to specify which one to use. Thus, if an agent was running on a machine that had two IP addresses, then you would have to use AM_HOST_NAME to point to the address that you want AppCenter (in this case, the agent) to use. If the agent is not running on a machine that has two IP addresses then you don't need to set AM_HOST_NAME at all.

Q: What can't I get the agent in an application using the Generic driver working properly?

A: When you set an object in AppCenter to use a generic driver this is what happens.

1) You issue a start command on the object and a start command is issued to the appropriate agent.

2) The agent then forks your driver (or script).

3) The agent expects you to return some information to it so that it knows that everything is OK or that something has failed.

4) You send things back to the agent from your generic driver by writing data to standard out.

5) Things are returned as name value pairs, one per line. There are several hard coded names and then the rest of the names are taken as property keys. The most important thing to send back is a status. Every generic driver operation must at least return the status.

To do this return

status,0 - the driver failed to do what is was supposed to do (that is, start, stop, ping) status,1 - the driver worked and the start/stop/ping was successful.

The word status is a hard coded key name.

6)If you fail, you may want to create an event about it, so you can also send back exception,string where string is the reason for the failure.

So for a simple generic start driver, if the driver succeeded in starting the thing, you might return only status,1

If the start operation failed, then you might return exception,Start operation failed due to lack of resources status,0

Now you can get more complex because you can set up your own template and create some properties in it.

You can associate that template with your AppCenter object. From your driver you can now send back values for those properties, by returning

my_property_key_name,value

Q: If the generic driver expects codes on stdout, then what effect does the stdout redirection parameter in the properties field have ?

A: It is up to the driver to support the properties that you give to it. All drivers support properties that will redirect input and output from the started process. Of course, on some drivers this does not make sense, for example, an object driver (no process involved). If your generic start driver starts something that can have output redirected, then you can pass appropriate properties to your driver and have it redirect output, if necessary. (Use the command line to do this) Note: Its not the drivers output that is redirected, its the process that is being started by the driver. Q: How does the statistics executable return the statistics for Generic processes?

A: The statistics driver is handled in exactly the same way as the Other drivers. To use it

1) Create a new template that will hold the statistics you want to collect.

    * Make sure each property you create has property attributes NUMERIC and DYNAMIC set

    * Give each property a unique KEY name.

    * usually, people put these statistics properties under the "stats" tab, but you can put them wherever you want.


2) Attach that template to the appropriate object in AppCenter; one that is using a generic driver.

3) Make sure the stats executable property is set correctly.

4) Now the generic driver executable that is to produce statistics should return name,value pairs, one per line, representing the key and the current value for each of the statistics you are collecting.

Example:

A template contains two NUMERIC, DYNAMIC properties with the key names CPU_LOAD and MEMORY_USAGE

Statistics driver should write to stdout the following :

CPU_LOAD,50
MEMORY_USAGE,7600
status,1

The driver must use the key name as the way to tell each property apart.

You can seen the properties change in value by looking at the appropriate properties on RHS pane of AppCenter. They should update every time new values come in. Once you see that happening, you should now be able to use the cockpit to produce graphs of your statistics.

Remember, if the values in the statistics you are collecting are always increasing (for example, some sort of count)then you set the graph to define a rate of change (per minute, hour, whatever), but if the values are actual figures (for example, a percentage) then the graph should be set to plot the exact amount each time. (Do this via graph properties.)

Q: How can I make AppCenter automatically start a configuration when an NT machine is switched on?

A: If you don't stop the configuration when you turn the NT machine off (so AppCenter believe that the configuration should be running), then it will come up as soon as the machine has been turned on and the agent has re-started.

3. AppCenter operations

Q: I would like to be able to replicate the core management services of AppCenter to distribute load and provide redundancy.

A: This is NOT planned for the 1.5 release of AppCenter. There are, however, a number of things that you can do right now to address this issue.

1) You can use hardware level fault tolerance, RAID arrays, multiple cold stand-by machines and so on, to give you fault tolerance at the hardware level. As long as the backup machine comes up with the same IP address, everything will work okay.

2) While the storage of AppCenter information is not fault tolerant, the AppCenter distributed application is. So if you lose the machine running the repository, each of the agents will continue to operate autonomously, and will continue to ping, and if so configured, to restart servers if they fail. (Failover across machine boundaries is not supported.) The agents will also continue to poll the repository, and when it comes up, they will synchronise their data with the repository. So while you do lose visibility and global control of your application, you continue to have your application being managed.

3) You can partition AppCenter into multiple domains, each dealing with a particular application or geographical domain. This reduces exposure to failure.

Q: Is it possible to print various views from the viewer?

A: This is not currently possible. The simple work around is to do a print screen for the view that you want, though this may be difficult with a large configuration.

Q: Does AppCenter mark hosts as Up or Down?

A: AppCenter concentrates on marking processes UP or DOWN and does not do SNMP polls of the hosts. If you look in the computer folders, then you will see hosts with checkmarks. These represent the hosts that have agents currently running on them. If it is not ticked, it could mean that the host is down or that it is up but that the agent has gone down or is not currently running.

Q: If a client asks AppCenter to shutdown a CORBA server process with PID of 51,for example, and the process with PID=51 already died and a new process with PID=51 had replaced it, would AppCenter kill the new process just because its PID=51?

A: AppCenter can handle this because it also stores the process creation time. AppCenter compares PID and process creation time and both have to match in order for the process to be deemed the same process.

Q: If the AppCenter agent goes down and then comes back up, how does it restore its internal state? Does the agent take control of the processes managed by it in its previous lifetime?

A: If the agent goes down and comes back:

1) The state is of managed objects is stored in the repository.

2) The agent will restart and check the repository to see if any process it is supposed to be looking at are still running and reconnect to them if they are.

3) Tell the monitor process about all processes that are not running and it can then decide if action needs to be taken.

Q: The AppCenter viewer crashes while monitoring DCE applications. How can performance be made more reliable?

There are a number of things that you can try:

1) Turn off the deep ping on all DCE servers.
2) Turn off tool tips. Do this by adding the argument
-DEnableToolTips=false
to the viewer.bat file on the jre line.

3) Turn the jit compiler off. Do this by adding the argument -nojit to the jre line and the argument set JAVA_COMPILER=off to a line before it

Q: Can AppCenter invoke a CORBA method on a managed CORBA process directly, without needing to trigger an event that starts a new process to make this call?

A: No. AppCenter cannot call an arbitrary method with defined parameters on a CORBA object. In other words, no "ping" type calls can be made. You need to write a client and an event to do this.

Q: What is the difference between an OSAGENT_PORT and a BROKER_PORT?

A: The VisiBroker SmartAgent uses a UDP broadcast protocol to enable objects to dynamically locate each other without prior knowledge of TCP addresses and ports. The one environment variable that is required to achieve this the location of the UDP broadcast port to listen on. All of the objects that need to communicate with each other need to have the same port number. This is also useful for creating different domains so that different applications don't get in each other's way.

AppCenter uses a naming service that is similar to the SmartAgent which is called the AppCenter Broker. The Broker doesn't use UDP broadcasting, and therefor, each machine needs to be set up with the host and port number of the Broker. There should only be one Broker in each AppCenter installation and all of the machines on the network should be configured to point to it. This is determined by the environment variables BROKER_HOST and BROKER_PORT.

Q: Do I need to have a Monitor Agent for each object in a VisiBroker configuration?

A: You only need a single Monitor Agent per server. This installs an interceptor that gathers performance statistics for every object in the server. For transient objects, the statistics are aggregated for all instances of that type of transient object.

Q: I have started a process manually, but AppCenter doesn't show it in an up state.

A: AppCenter cannot pick up or acquire an object's state when you start the object manually. You have to start it in an AppCenter interface in order to have AppCenter know it's running, and to monitor it. However, in order for AppCenter to be able to start an object, you must be able to start that object manually from a command line. This means that you must make sure that you set up the environment, and the command line, correctly. Q: AppCenter isn't showing the correct date and time for events. What can I do to correct this?

A: The problem could be due to Java using the wrong time zone for your areas. In the AppCenter viewer, if you look select the File|System Information option and click the Java tab, you will see a list of system properties for Java. The property "user.timezone" indicates what time zone Java thinks you are in. The default is often PST (Pacific Standard Time).

If Java has not obtained the correct time zone for your location, There are two work-arounds to consider:

- Set the TZ environment variable (UNIX only) to one of the time zone IDs listed in the table below. Because some of these IDs are specific to Java, you may only want to set it in your viewer script.

- Edit your viewer script/batch file to add the system property "user.timezone", such as:

-Duser.timezone=AET

to the line invoking the Java VM.

Below is a list of known valid time zone IDs for JDK 1.1.6.

Windows name user.timezone ID TimeZone ID
"GMT Standard Time" "GMT" "Africa/Casablanca"
"Romance Standard Time" "ECT" "Europe/Paris",
"Egypt Standard Time" "EET" "Africa/Cairo",
"Saudi Arabia Standard Time" "EAT" "Asia/Riyadh",
"Iran Standard Time" "MET" "Asia/Tehran",
"Arabian Standard Time" "NET" "Asia/Yerevan",
"West Asia Standard Time" "PLT" "Asia/Karachi",
"India Standard Time" "IST" "Asia/Calcutta",
"Central Asia Standard Time" "BST" "Asia/Dacca",
"Bangkok Standard Time" "VST" "Asia/Bangkok",
"China Standard Time" "CTT" "Asia/Shanghai",
"Tokyo Standard Time" "JST" "Asia/Tokyo",
"Cen. Australia Standard Time" "ACT" "Australia/Adelaide",
"Sydney Standard Time" "AET" "Australia/Sydney",
"Central Pacific Standard Time" "SST" "Pacific/Guadalcanal",
"New Zealand Standard Time" "NST" "Pacific/Auckland",
"Samoa Standard Time" "MIT" "Pacific/Apia",
"Hawaiian Standard Time" "HST" "Pacific/Honolulu",
"Alaskan Standard Time" "AST" "America/Anchorage",
"Pacific Standard Time" "PST" "America/Los_Angeles",
"US Mountain Standard Time" "MST" "America/Denver",
"Central Standard Time" "CST" "America/Chicago",
"Eastern Standard Time" "EST" "America/New_York",
"Atlantic Standard Time" "PRT" "America/Halifax",
"Newfoundland Standard Time" "CNT" "America/St_Johns",
"SA Eastern Standard Time" "AGT" "America/Buenos_Aires",
"E. South America Standard Time""BET" "America/Sao_Paulo",
"Azores Standard Time" "CAT" "Atlantic/Azores",

Q: When the configuration from above is requested to stop, AppCenter manages to stop and clean up everything except the OADJ server. A JRE executable is left running and I have to manually stop the executable in the NT Task Manager.

A: There is a known problem with shutting down any process started by vbj.exe (which includes oadj.exe) on NT. This is due to the fact that vbj.exe forks a separate process for the Java runtime, and does not terminate it properly. An attempt has been made to resolve this by a combination of Ctrl-C generation in AppCenter, and Ctrl-C trapping in vbj.exe.

Alternately, you can:

1. Use oad.exe rather than oadj.exe - the functionality is identical.

2. Use java or jre directly, rather than going through the exe..

Q: I suspect that AppCenter is not providing the correct state information. What can I do to verify this?

A: The steps that should be taken are as follows:

A) Take no action for a minute or two to see if the inconsistency in the Viewer clears itself up through a ping cycle and the Viewer polling the database for the current state.

B) If after a ping cycle and Viewer refresh, AppCenter still displays information that you believe to be incorrect, you should manually ping the object showing incorrect information. The result from the ping may indicate that the agent, process, or machine is unreachable. This information should be noted. The manual ping should correctly verify the state of the object.

C) If after a manual ping the AppCenter Viewer still displays erroneous information, you should attempt to verify manually that the process is in a different state than what AppCenter thinks it is. If the viewer thinks an object is up and you believe it is down, then you should verify that the process is still present by using the PID table. If the process is present in the PID table then AppCenter is showing the correct state. It is possible that the process is hung and unreachable. At this point you should manually takes steps to rectify this situation. This problem may be rectified by cycling the object.

D) If you believe that the process is up but the viewer shows it as down or unreachable, then it is likely that there is a communication problem between the AppCenter Agent and the AppCenter Database. If the agent is not running on the machine where the process is running, then the agent should be restarted. It is also possible that a driver process (the mechanism the agent uses to start/stop/query processes) is hung. If this is the case, then the driver process should be manually killed which should allow the connection between the Agent and the Database to be re-established.

E) These steps should insure that the viewer displays the correct information. If situations occur where the viewer is showing incorrect information on a regular basis, then whatever verification was done (via the steps above) should be documented and AppCenter support should be contacted.

Incorrect display information is usually caused by one of several factors. First, time delay is the usual cause. Waiting for ping cycles or manually pinging an object resolves this issue. Second, the AppCenter agent may have lost contact with the database. This should be a rare occurrence. Typically restarting the agent is all that should be needed here. When the agent restarts, it should correctly reacquire the objects it was managing. Finally, if a driver process hangs then the object will be unreachable via the AppCenter Viewer.

Q: Can I kill AppCenter processes from NT?

A: Microsoft provides a utility in the Windows NT Resource Kit that allows a user to kill processes not normally killable from the taskmanager. This utility is called kill.exe and allows the user who started a process or a user who has Administrator privileges to kill a process.

This was tested by having an AppCenter agent start basicsrv. The agent is running as a service under a user account who only has User level privileges. Normally the basicsrv started by this process is not killable from the taskmanager by anyone other than the owner of this process. However, by using kill.exe another user who had Administrator privileges can kill the process by using this utility from the command line.

Q: After running an agent and starting servers on a machine and doing a process status command. I see lots of "defunct processes" listed. What is going on?

A: This is normal behaviour. The AppCenter agent forks a lot of driver processes. Under UNIX these processes, once they die, will remain as defunct processes until "reaped" by the agent every ping cycle. Thus every ping cycle it cleans up the stuff from the last ping cycle. The longest a defunct process will remain is one ping cycle.

Q: What is the difference between sleep time and wait time?

A: Wait time is the amount of time that you can specify between AppCenter issuing a command to an object and verifying that the object is responding to that command. Sleep time is the amount of time that you specify in between AppCenter attempting to verify if a command has been responded to; that is, retries.

4. Using cockpits

Q: I can now set up all kinds of objects, operators and instruments in a cockpit, in the design tab. But when I change to view tab, I see empty instruments.

A: There are two requirements for collecting & displaying statistics:

1) When you use the wizard to define your server you have to say that the server is to gather performance statistics. Then start it.

2) You have to enable the cockpit (right click on cockpit and select Actions|Enable, so that it will start collecting statistics.

Q: What are the performance metrics that can be accessed to monitor an applications performance?

A: The type of performance information that is available depends on the type of driver that you are using. For Entera users, the statistics that are available are

* Server In Bytes
* Server Out Bytes
* Server Busy Time
* Server RPC Count
* Client In Bytes
* Client Out Bytes
* Client Busy Time
* Client RPC Count

For VisiBroker users, AppCenter gets the performance metrics via the Performance MonitorAgent interceptors. The attributes of server performance that can be collected are

* Call Latency
* Marshalling Buffer Size In
* Marshalling Buffer Size Out
* Total calls

For each of these attributes, the following calculations can be performed

* Delta
* Total
* Maximum
* Minimum
* Average

Q: What is the best way to gather performance statistics for long running processes?

A: We recommend that you set up a group of graphs. For example, a nest of graphs that each contains about 400 points and have a different sample period for different total period, such as:

* Poll once a day to get about a year of data

* Poll once every two hours to get about a month of data

* Poll once every half hour to get about a week of data

* Poll once every five minutes to get about a day of data

If you drop an object onto the cockpit four times and connect each instance to a separate graph, then you can setup the four graphs such as those above.

5. Using events and actions

Q: Can AppCenter integrate with HP OpenView by sending messages to OpenView upon certain events?

A: This facility is available in AppCenter by using its Event/Action capabilities to send SNMP traps to OpenView.

Q. Why doesn't launching an application from an Event/Action sequence work?

A: When an AppCenter EventAction executes a command it passes about 8 or 9 parameters to the command as command line arguments. These include the event id, uuid of object, message string, status and so on.

Change your action to a simple "echo" and you will see all of the parameters. The application may be objecting to all the parameters being passed to it. To run it, put its start command in a batch file and execute the batch file as your AppCenter action. In this way, the application won't see any of the event parameter information.

Q. What is the effective working directory for an Action?

A: By default, it's C:\AppCenter\misc.

Q: What is the preferred WinNT (lightweight) way of doing IPC from an SNMP extendible agent DLL to AppCenter, assuming that the Agent and AppCenter both run on the same box?

A: You will have to use the provided *.libs to do the IPC.

Q: Can the event log be exported to a flat file, preferably with special character (for example "," or ';" or "|") delimited fields?

A: No, this is not possible in the current version. However, by creating a filter that is true for every event, you can create an action that will write that event out to the bottom of a log file in any format you like.

Note that this is a "cgi-bin" solution.

Q: Can AppCenter generate an SNMP trap on a login failure, that is, a security trap?

A: No. This is a feature not currently supported.

Q: Can user login password changes (not the password itself, just the act of changing it), be logged?

A: No, user logins do not generate events in the current version.

Q: Is using EMI the only way to intercept statistics and designate where they are sent?

A: No. f you are using VisiBroker, you should use the performance monitor agent to collect statistics. Statistics aren't sent anywhere. They reside in the database until a call is made for them.

6. The AppCenter API

Q: How do I start the AppCenter VisiBroker Server?

A: An example is provided below

C:\> setup-vbj

C:\> cd \AppCenter\DevKit\CORBA

C:\AppCenter\DevKit\Corba>idl2java appCenter.idl

C:\AppCenter\DevKit\Corba>javac *.java

C:\AppCenter\DevKit\Corba>ls *.exe
appCorba.exe

C:\AppCenter\DevKit\Corba>start appCorba.exe

C:\AppCenter\DevKit\Corba>java Client
Initializing the ORB ...
Binding to an AppCenter instance ...
Logging in to AppCenter ...
Out from acLogin() security: *
Getting UUID of Juno object ...
Out from acFindObject() uuid: L:901250390117
Starting the Juno object ...
Creating an event for Juno ...
Getting the object label for Juno ...
Out from acGetObjectLabel() label: Juno
C:\AppCenter\DevKit\Corba>

Q: I don't see an API to get events out of the repository, just to push them in.

A: True, there is no such API in AppCenter as yet.

7. AppCenter administration --------------------------- Q: Can I change the rules file? For example, in the case of a fault tolerant group, if a primary object goes down & backup starts up, and then primary comes back up, can AppCenter make the original primary object the new backup?

A: This is not recommended. The easiest way to do this is not to have a link between the two, but instead put them both in a group with a desired number of children being 1.

Q: Can I grant user privileges on an application by application basis?

A: This is NOT addressed in the 1.5 release of AppCenter. One way to achieve this is to set up separate AppCenter core management services per application. This has the down side that it no longer becomes possible to view multiple applications from a single Viewer, though you can, of course, have multiple viewers active.

8. Environment variables ------------------------ Q: How do I create environment variables?

A: AppCenter makes it easy to create environment variables and apply them to objects. The important thing to remember is that environment variables are created as templates. The following example provides the general process.

    1/ In the navigator, open the Templates group.
    2/ Right click on the Templates object and select New|Template from the context menu.
    3/ In the dialog, select which group (if any) you want to create the new template under and give it a name. Then click OK.
    4/ In the navigator, right click on the template that you have just created and select properties from the context menu.
    5/ It is now time to create the environment variable itself. Right click in the editor and select New from the context menu.
    6/ On each tab, you need to supply the information that determines the environment variable.
      * On the Group tab, supply the Key, Label, Type and Base Class. It is a good idea to use a name like ENV for environment variables, though this is not mandatory.
      * On the Tab Group tab, supply the name of a tab group.
      Again, It is a good idea to supply a representative name like ENV Var or something of the like. Then click the Add button.
      * On the Possible Values tab, supply these if they are applicable and click the Add button.
      * On the Help Info button, type in any form of information that you think might be useful to the user when viewing this environment variable
    . 7/ When you have finished, click the OK button. This creates the template containing the new environment variable in AppCenter. Then, click OK to close the properties editor.


NOTE: The first time that you create a property of any sort on a new template that property will not be visible after you click the OK button.

Q: How do I apply an environment variable that I have created to an object?

A: Applying an environment variable to an object means applying the template. To do this

    1/ Open a configuration and select the object that you want to apply the environment variable to.
    2/ Select the template tab for that object.
    3/ Open the Object Browser, click its templates tab and navigate to the template that contains the environment variable that you want to apply.
    4/ Click on the template and drag it onto the object's Template tab.
    5/ Click the Add relationships tool and draw a relationship between the object and the template.

Q: How do I apply an environment variable to an existing template?

A: There are two ways to do this

    i) Create a new property for that environment variable on an existing template, or
    ii) Create a new template with that environment variable and make another template inherit from it.

To make one template inherit from another

    1/ Select the template that you want to inherit properties.
    2/ Click on the template tab if it is not already selected.
    3/ Open the Object Browser.
    4/ Select the template that you want to inherit properties from, and frag it onto the tab view.
    5/ Click the Add Relationship button and draw a relationship between the templates.


Q: How do I apply an environment variable to all of the objects that need it?

A: Once you have created an environment variable inside a template, you can add it to any object that requires it by dropping it onto that object's template tab and creating a relationship.

If the environment variable is inherited by an existing template, you can propagate it to all of the objects that use the existing template.



    1/ Ensure that a relationship exists between the template containing the environment variable and the template that inherits from it.
    2/ Select the template that contains the environment variable in the navigator.
    3/ Select Tools|Propagate Template Properties in the Menu bar. 4/ Click OK.

9. Using Java VisiBroker servers

Q: When should I use java.exe, jre.exe or vbj.exe?


A: Sun Microsystems provides two different Java environments; the Java Developer's Kit (JDK) and the Java Runtime Environment (JRE). The JDK allows you to compile your programs and then run them with java.exe. The JRE only allows you to run your programs with jre.exe. You must have either JDK or JRE installed on your computer. Borland VisiBroker for Java provides vbj.exe, a utility for your convenience, which sets some environment variables, adds some extra command line parameters and then launches either java.exe or jre.exe. You don't need to use vbj.exe if you use all the default settings for the osagent (for example, OSAGENT_PORT=14000). If you use vbj from VisiBroker 3.3 or earlier on Windows NT then AppCenter will not be able to stop your servers with AppCenter.

Q: What are javaw.exe and jrew.exe?

A: These are the same as java.exe and jre.exe except that they don't start a console.

Q: How should I set up the Java ClassPath?

A: There are four main elements that must be in the ClassPath for a Java VisiBroker Server to run.

    1/ The Java run time classes (/lib/classes.zip for JDK or /lib/rt.jar for JRE). You may include the JFC (or Swing) classes here, but most Java servers will not require a graphical interface.

    2/ The VisiBroker ORB classes (vbjorb.jar, vbjapp.jar, vbjtools.jar, vbjcosnm.jar and vbjcosev.jar) are all found in the /lib directory). If you are launching your server with vbj.exe, then these are automatically added to your ClassPath.

    3/ The Performance Monitor classes which are used if you are collecting performance data (/perf/VBMonitor.jar)

    . 4/ Your Server classes.

It is recommended that you add the Java runtime classes and the VisiBroker ORB classes to the ClassPath in the AppCenter Agent's BAT file (NT) or script file (UNIX) since all processes started by the Agent inherit the Agent's environment. For NT, add them after the call to env.bat. For UNIX, add them after the EXTRA_SHLIBS initialisation.

The Performance Monitor jar file is added automatically when you set "Gather Performance Statistics" to Yes in the "VisiBroker Server" wizard. The Server classes should be added to the ClassPath in the "VisiBroker Server" wizard. Enter "$CLASSPATH;<server classpath>" in the ClassPath field. If you are using JRE make sure that "-classpath %CLASSPATH%" appears in the "Java Options" field of the "VisiBroker Server" wizard because jre.exe doesn't read the ClassPath environment variable.

Q: What are the Java Options?

A: These are the command line options for the Java Virtual Machine (VM). You can see a complete list by typing "java", "jre" or "vbj" at the command line. The AppCenter driver may add extra options before it starts the server. This depends on the choices you make in the "VisiBroker Server" wizard.

Q: What do I enter in the "Main Class (and Arguments)" field?

A: This is the field where you enter the Java server's class name with the full package name followed by your server's command line arguments.

Q: What is the starting directory?

A: This is the directory where your server will run. Files will be read in and written out to this directory by default. If you choose to generate .out and .err files in the "VisiBroker Server" wizard then these will also be written to this directory.

Q: How do I register a Java VisiBroker server with the OAD (Object Activation Daemon)?

A: At the moment there is a known problem registering a Java VisiBroker server with the OAD. You cannot construct the server in AppCenter as a Java server, but you must treat it like a C++ server. In the "VisiBroker Server" wizard, enter the "Type of Server" as C++, not Java. For the executable name enter the fully pathed Java executable that you're using (e.g. c:\jdk1.1.6\bin\java.exe). Then enter all the Java command line arguments in the "Application Args:" field. Example: Take the Bank Server in the VisiBroker for Java java_examples directory. Assume that Java and VisiBroker for Java are installed on a computer called "Enterprise" in the directory "c:\jdk1.1.6" and "c:\Inprise\Vbroker" respectively.

1/ Launch the "New VisiBroker Server" wizard

    * Create Options = "Express"
    * Server Type = "OAD"
    * CORBA Server Display Name = "Bank Server"
    * Click on the "Enterprise" computer (If it's not there then make sure the AppCenter Agent is running on that computer and then refresh the Viewer)
    * Type of Server = "C++" (Note that we can't use Java in the current release)
    * Executable Name = "c:\jdk1.1.6\bin\java.exe"
    * Environment Args =
    * Application Args = "-classpath=%CLASSPATH% Server"
    * Reference Data =

2/ Launch the "New VisiBroker Object" wizard
    * Create Options = "Express"
    * Object Type = "OAD"
    * CORBA Server Display Name = "Bank Object"
    * Skip the screen which allows you to browse the OAD
    * Click on the "Bank Server" server
    * Find Object = "Location Service Entries"
    * Repository Id = "IDL:Bank/AccountManager:1.0"
    * Object Name = "BankManager"
    * Host = (Note: this should already be set)
    * Search Network for Location Agent = false

10. Miscellaneous

Q: Can a server differentiate between if it is being started up because the whole application is being started, or if the startup is ad hoc, because that particular server died & is being restarted and consequently some of the initialisation steps may not be relevant?

A: No, you can't. AppCenter starts servers by simply executing the command line necessary to start the server. The server itself has no interaction with AppCenter.

Q: When I try to use the menus in the viewer, the selected sub-menu option appear as black-on-black.

A: This problem appears on Solaris machines when the Internet browser is started before the AppCenter viewer and the browser monopolises all of the colors. The solution is either to stop the browser before you start the viewer or to always start the browser so that it sets its own color map. For example, you would start a Netscape browser with the command netscape -install

Q: My naming service has failed but it still appears in the AppCenter viewer.

A: The AppCenter browser uses the Location Service (which is a wrapper around the SmartAgent) to locate the various services which you want to manage, such as Naming Services, or OADs. usually, when a process shuts down, it will unregister all its objects from the SmartAgent. However, if a process terminates abnormally or abruptly, any objects which have been registered with the SmartAgent will not be unregistered. The SmartAgent does periodically ping all objects registered with it, and if they do not respond, it will remove them from its list. This means that, for example, if a Naming Service is abruptly terminated, it may still appear in the AppCenter viewer for some time. If you click on this particular service, the details for the service will not appear since the service is actually a relic which no longer exists. Usually, clicking on the service, and then collapsing and expanding the tree will remove the entry.

Q: When I am using a wizard to create or update CORBA servers, the the command line in the server's activation property list does not appear to be correct. Do I need to edit it?

A: The command Line in the server's activation property list is not correct until after the server is run. This doesn't cause any operational problems because the server is run with the correct arguments, but it is confusing because what is visible in the viewer is not consistent with what has been declared. The issue is that the command line can be very complex. The driver interprets all of the various properties that you have set in order to work out what the command line should be. This has to be done in the driver, since it is the only place (apart from wizards)which has direct knowledge of the type of object which is being monitored.

 
Site Map Search Contact