Kbase 18472: Deployment Test with Apptivity Developer Installation
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/26/2005 |
|
Status: Unverified
GOAL:
How to simulate a test deployment environment when you only have Apptivity Developer installed.
FIX:
When the Component Manager that comes with Developer is started, it
runs without a Distribution Manager in standalone mode. With the
properties that are in the Program Group icon, this Component Manager runs on localhost on an unpredictable port. These defaults will not work across machines in a deployment environment. However, with modified properties this Component Manager can be used for test deployments. Since the Proxy Manager and Distribution Manager classes are not supplied, a Proxy Manager can't be used.
Here is the general process for test deploying an applet with
Apptivity Developer.
Step 1 -
Create a project in Developer
Step 2 -
Deliver it to your deployment directory (which has already been
created).
The environment for Project -> Properties determines what is written
to the
<project>.properties file when the application is deployed.
Since this file will need to be subsequently edited this is not too
important. For a stand-alone client this directory can be anywhere.
For an applet client it should be in a directory available to the
web server, for example:
C:\InetPub\wwwroot\<deploydir>
Step 3 -
Start the Component Manager (CM) with the appropriate properties.
This will write a cmanager.ior file and a cfactory.ior file which
will contain the host and port information as well as other
information required by the ORB. The cfactory.ior is the only file
used by the application client. The cmanager.ior file can be used
by Apptivity Explorer and the admin shell.
These files will be created in the "Start in" directory for a
shortcut or the current directory if started from a command line.
To make these files readily available for download start the CM in
the deployment directory:
C:\InetPub\wwwroot\<deploydir>
The default for starting up Component Manager is:
C:\Apptivity30\Java\bin\java.exe -nojit
-Dapptivity.cmanager.mode=standalone -classpath
.;c:\Apptivity30;c:\Apptivity30\Java\lib\classes.zip;
c:\Apptivity30\OrbixWeb;
progress.apptivity.cmanager.ComponentManager
For the purpose of this test, you will need to modify this as follows:
You can only put a fixed number of characters in a shortcut, so if you
create a shortcut for starting the CM, you may want to leave out the
-nojit parameter, as well as the classpath, and rely on the system
classpath variable. If you start Component Manager on the command line
you won't have this limitation.
Assuming you have set the classpath system variable to include:
.;c:\Apptivity30;c:\Apptivity30\Java\lib\classes.zip;
c:\Apptivity30\OrbixWeb;
Your command line or shortcut target should be:
C:\Apptivity30\Java\bin\java.exe -Dapptivity.cmanager.mode=standalone
-Dapptivity.cmanager.host=<hostname> -Dapptivity.cmanager.port=5555
progress.apptivity.cmanager.ComponentManager
The CM console should look like this with the specified Host and
Port displayed:
Apptivity Ver 3.0.1.158
Component Manager - Startup:
Host = <hostname>
Port = 5555
SSL enabled = false
Component Manager IOR File = cmanager.ior
Component Factory IOR File = cfactory.ior
Once the apptivity.cmanager.host property has been specified this
will work across machines. A specific port is designated so that
the created IOR file will not vary.
Step 4-
Setup your web server as described in the Deploying Apptivity
Applications document, so that the Apptivity classes are available.
Step 5 -
Edit the <project>.html file
When you deploy your application, Developer adds code to access the
/redist directory archives. Since these are available only with the
Server these will not be available for this test.
Take out everything from <script> to </script>, inclusive, and replace
it with the following line:
<applet code='abApplet' height=428 width=434>
This will force download of the loose classes.
(You can replace the values for applet width and height with your own
values.)
Step 6 -
Edit the <project>.proper.ties file
Here is the relevant section of the property file, with the properties
set as required for this test:
apptivity.cfactory=url
apptivity.cfactory.url=http://<hostname>/<deploydir>/cfactory.ior
#apptivity.naming.host=localhost
#apptivity.naming.port=2804
#apptivity.naming.nameroot=NS
org.omg.CORBA.ORBSingletonClass=IE.Iona.OrbixWeb.CORBA.ORB
org.omg.CORBA.ORBClass=IE.Iona.OrbixWeb.CORBA.ORB
The properties that would be used with a Distribution Manager are
commented out and the properties that are needed to support a
'standalone' CM are added. This example would be appropriate for
a web-based applet application. The cfactory.ior file is downloaded
with the application and this gives the client a reference to connect to the Component Manager.
Note that the URL points to the directory where the application was
deployed relative to the web server's document root. This also
assumes that the CM was started in this directory. If the CM was
started elsewhere, the location must be available to the web server
and the URLs must correspond to this location.
If this were a stand-alone client (vs. web-deployed) application, you
would use the following properties and values:
apptivity.cfactory=file
apptivity.cfactory.file=cfactory.ior
#apptivity.naming.host=localhost
#apptivity.naming.port=2804
#apptivity.naming.nameroot=NS
org.omg.CORBA.ORBSingletonClass=IE.Iona.OrbixWeb.CORBA.ORB
org.omg.CORBA.ORBClass=IE.Iona.OrbixWeb.CORBA.ORB
This assumes that the cfactory.ior files is copied to
the deployment directory on the deployment machine after the Component
Manager was started on the Developer machine.
If the Component Manager is always started with the same host and port, you shouldn't need to recopy the ior files for a subsequent test..