Java Q&A
by Cliff Berg

Example 1:

(a)
COM.odi.ObjectStore.initialize(getInitThread());
COM.odi.Transaction tr = COM.odi.Transaction.begin(COM.odi.Transaction.update);

(b)
tr.commit(COM.odi.Transaction.RETAIN_UPDATE);

(c)
persistentTasks = (COM.odi.util.OSVector)(database.getRoot("PersistentTasks"));

(d)
public java.util.Vector getTasks() throws java.rmi.RemoteException;
public RemoteTask addTask(SerializableTask task) throws java.rmi.RemoteException;
public boolean delTask(RemoteTask task) throws java.rmi.RemoteException;

Example 2:
public void setName(String name);
public String getName();
public void setDesc(String desc);
public String getDesc();
public void setDate(java.util.Date date);
public java.util.Date getDate();

Example 3:
public void connectToTaskServer(String serverURL) throws Exception;
public void closeConnection();
public TaskServer getServer();

Example 4:
java.io.FileOutputStream ostream = new java.io.FileOutputStream(appletConfigFile);
java.io.ObjectOutputStream p = new java.io.ObjectOutputStream(ostream);
System.out.println("Saving applet state...");
p.writeObject(taskClient);
p.writeObject(serverURL);
p.flush();
ostream.close();

Example 5:
rem CLASSPATH needs to contain the JDK class (for Java 1.1, or for 1.02 and RMI),
rem and the ODI class zip files (pse.zip and tools.zip). RMIHOME needs to be
rem defined to point to the location of the RMI installation, if using 1.02.

del *.class
javac -nowarn TaskClientApplet.java

rmdir /q /s .\temp
mkdir .\temp
java COM.odi.filter.OSCFP -dest .\temp .\PersistentTaskImpl.class
copy .\temp\*.class .
del .\temp\*.class

java COM.odi.filter.OSCFP -dest .\temp -pa .\RemoteTaskImpl.class
copy .\temp\*.class .
del .\temp\*.class

java COM.odi.filter.OSCFP -dest .\temp -pa .\TaskServerImpl.class
copy .\temp\*.class .
del .\temp\*.class

java -Drmi.home=%RMIHOME% sun.rmi.rmic.Main -d . TaskServerImpl
java -Drmi.home=%RMIHOME% sun.rmi.rmic.Main -d . RemoteTaskImpl

start /min java -Drmi.home=%RMIHOME% sun.rmi.registry.RegistryImpl


2


