When developing applets that use SmartSockets (or any other type of networking) keep in mind the restrictions placed on applets by the Java Security Manager. Applets are only allowed to perform a subset of the tasks that a standalone Java application can, for reasons of security.
These restrictions may be configurable, based on the Java Virtual Machine (JVM) being used to execute your applet, but by default several key security restrictions are imposed that you should be aware of.
These restrictions can have a significant impact on the design of your applet’s use of SmartSockets.
Because a downloaded applet can only make connections back to the machine from which it was retrieved, use of the ss.server_names option is a must. Use ss.server_names to specify the machine (typically a web server) from which the applet was downloaded. This machine must be running RTserver or no connection is possible.
Because your applet is derived from the Applet
class, there are useful methods that can be used to help facilitate the correct setting of ss.server_names. For example:
You might want to make a connection through a firewall, called tunneling through a firewall. Usually, this involves connecting to a proxy server. To do this, you need to use the HTTP_CONNECT proxy extension with your logical connection name. For example:
See the TIBCO SmartSockets User’s Guide for more information on tunneling through firewalls.
Typically, applets cannot determine the machine name nor IP address of the local machine. This type of information cannot be relied upon for RTclient applet identification purposes, such as setting unique subject name. Keep this in mind when designing SmartSockets applets.
Do not design applets that require access to the local file system, for temporary storage or any other purpose, including file-based guaranteed message delivery (GMD). If you need to use GMD, use memory-based GMD. For more information, see Chapter 11, Guaranteed Message Delivery.
Remember, local files may not even be checked for existence.
TIBCO SmartSockets™ Java Library User’s Guide and Tutorial Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |