
The handout for project3 is in

	/u/u3/603/96spring/project3/handout.ps

You can also access it from the CS 603 homepage

	http://www.cs.purdue.edu/homes/grr/603/96spring/homepage.html

Start ASASP. You only have two weeks to do this project.

	--Gustavo
From grr  Mon Apr 15 10:26:21 1996
Return-Path: grr
Received: (from grr@localhost) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) id KAA25369; Mon, 15 Apr 1996 10:25:31 -0500 (EST)
Date: Mon, 15 Apr 1996 10:25:31 -0500 (EST)
From: Gustavo Rodriguez-Rivera <grr>
Message-Id: <199604151525.KAA25369@ector.cs.purdue.edu>
To: 603, qiwei@ecn.purdue.edu
Subject: Re: Orbix project
Cc: grr
Status: R
Content-Length: 217

>   Could you fix the permission of /u/u238/grr/SUNWspro?

	Done. Sorry about that.

	The orbixsol2.mk that is included by Makefile contains
the path to the right compilers. You just have to type "make".

	--Gustavo


From grr  Tue Apr 16 12:28:40 1996
Return-Path: grr
Received: (from grr@localhost) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) id MAA14386; Tue, 16 Apr 1996 12:27:45 -0500 (EST)
Date: Tue, 16 Apr 1996 12:27:45 -0500 (EST)
From: Gustavo Rodriguez-Rivera <grr>
Message-Id: <199604161727.MAA14386@ector.cs.purdue.edu>
To: 603
Subject: Do not overload xinuserver...
Cc: grr
Status: R
Content-Length: 344

	Since the xinuserver is not a powerful machine,
lets prevent overloading it. 

	You have to make and run your clients and 
servers in xinuserver, but everything else (xemacs, etc) 
can run in any of the other xinu1-20 machines. 

	In this way you will get a faster response from
the computer and everybody else will also be happy.

	--Gustavo

From grr  Tue Apr 16 14:01:14 1996
Return-Path: grr
Received: (from grr@localhost) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) id OAA23991; Tue, 16 Apr 1996 14:00:22 -0500 (EST)
Date: Tue, 16 Apr 1996 14:00:22 -0500 (EST)
From: Gustavo Rodriguez-Rivera <grr>
Message-Id: <199604161900.OAA23991@ector.cs.purdue.edu>
To: 603
Subject: Problems with grid...
Cc: grr
Status: R
Content-Length: 497

>
> I have lots of undefined symbols when I compile grid...
>

Type "make clean" and then "make" again.

>
> I can't register my grid server using putit.
>

The name "grid" is already taken by my own grid server.
You have to register your server with a different name.

Change the name of "grid" to "gryd-your-name" in:

	1. The "putit" command
	2. The server main
	3. The client main

and then make and run everything again.

>
> Is orbixd already running in xinuserver?
>

	Yes.


		--Gustavo
	

There is an error in ClientMain.C. 

Instead of

	bank = Bank::_bind( ":BankOneLafayette", argv[1], IT_X);

it should be 
	
	bank = Bank::_bind( bankName, argv[1], IT_X);

Make sure that the same server name is used in the server, "putit", 
and the client.

	--Gustavo


-- Included message ---

Hi,
  I've problems when calling  Bank_bind and got the following messages when running the client:

Unexpected exception SYSTEM_EXCEPTION  : 10101-- Invalid object reference
  - The server application cannot find the object denoted 
     by the object reference
`:\xinuserver.cs.purdue.edu:BankOneLafayette:::IR:Bank' given to it. 
     A possible explanation is that the object has been deleted 
     by your server in its marshalling code (did you forget to 
     _duplicate () an object reference previously returned by 
     the server ?
  [Completion status : NO]

  Could you tell me what will cause the binding fail?

  Thanks a lot.
tsang.
--- Included message 

I'm having problems with the idl compiler.

xinu2 71 ~/Orbix/project3 % make bankC
/u/u238/grr/Orbix/bin/idl  -B BANK.idl
/u/u238/grr/Orbix/bin/idl: ^?ELF^A^B^A^B^B^A^A\2614: not found
/u/u238/grr/Orbix/bin/idl: syntax error at line 2: `^E' unexpected
make: *** [bankC.C] Error 2

-----------------------

Use the xinuserver instead of xinu2. Orbix is only available for
SPARCS and not for the Pentium machines.

	--Gustavo


  Remember always to call _duplicate() before you return a reference.
Orbix always decrements the reference counter after returning a reference.
Check Chapter 3 "Summary of IDL to C++ mappings" to know the rules for
memory management in Orbix.

  Also before implementing inheritance in checking and saving accounts 
read chapter 6 "Inheritance".

	--Gustavo

> I am getting a lot of strange undefined symbols...

/u/u238/grr/SUNWspro/SC2.0.1/CC -g -I/u/u238/grr/Orbix/include -o server BANKS.o BANK_i.o Server_Main.o -L/u/u238/grr/Orbix/lib -lITsrv \
                                -lnsl -lsocket
Undefined                       first referenced
 symbol                             in file
Account_i::__vtbl (__vtbl__9Account_i__17CheckingAccount_i) (Hint: try checking whether the first non-inlined, non-pure virtual function of class Account_i is defined) BANK_i.o
Object::__vtbl (__vtbl__6Object__16SavingsAccount_i) (Hint: try checking whether the first non-inlined, non-pure virtual function of class Object is defined) BANK_i.o

. . .


Make sure that -all- virtual functions in your implementation (including
destructors) are implemented. They could be dummy functions (empty) 
but they need to be implemented to pass the link phase.

	--Gustavo

 Exception handling is in Chapter 3 "Summary of IDL to C++" Mapping.

	--Gustavo
From bdd  Sat Apr 20 16:40:51 1996
Return-Path: bdd@cs.purdue.edu
Received: from bach.cs.purdue.edu (bdd@bach.cs.purdue.edu [128.10.20.54]) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) with ESMTP id QAA03805; Sat, 20 Apr 1996 16:40:50 -0500 (EST)
Received: (from bdd@localhost) by bach.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) id QAA20882 for 603; Sat, 20 Apr 1996 16:40:26 -0500 (EST)
From: Bozhidar Dimitrov <bdd>
Message-Id: <199604202140.QAA20882@bach.cs.purdue.edu>
Subject: xinuserver
To: 603
Date: Sat, 20 Apr 1996 16:40:25 -0500 (EST)
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Status: R
Content-Length: 267

Hi,

I would like to second Gustavo's suggestion and to ask people to NOT use the
xinuserver for anything other than compiling and running the Orbix programs.
Currently there are two people running emacs off of xinuserver, and it's
getting awfully slow.

Thanks,
Boz

From blaneyl  Sat Apr 20 17:34:52 1996
Return-Path: blaneyl@cs.purdue.edu
Received: from tristram.cs.purdue.edu (tristram.cs.purdue.edu [128.211.1.28]) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) with ESMTP id RAA10090 for <grr@ector>; Sat, 20 Apr 1996 17:34:51 -0500 (EST)
Received: (from blaneyl@localhost) by tristram.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) id RAA13945; Sat, 20 Apr 1996 17:34:43 -0500 (EST)
Date: Sat, 20 Apr 1996 17:34:43 -0500 (EST)
Message-Id: <199604202234.RAA13945@tristram.cs.purdue.edu>
From: Liza Blaney <blaneyl>
To: grr
Subject: Compiling
Status: R
Content-Length: 248


Is there any other machine we could compile on? It's hard to compile on
one machine and fix on the other if you are using emacs (especially on
dialup kermit!) Any other Sparcs lying aroound that you could load just
your compiler version on?

Liza

From blaneyl  Sat Apr 20 18:32:42 1996
Return-Path: blaneyl@cs.purdue.edu
Received: from xinu2.cs.purdue.edu (blaneyl@xinu2.cs.purdue.edu [128.10.3.102]) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) with ESMTP id SAA16048 for <grr@ector>; Sat, 20 Apr 1996 18:32:41 -0500 (EST)
Received: (from blaneyl@localhost) by xinu2.cs.purdue.edu (8.7.3/PURDUE_CS-1.4) id SAA20969 for grr; Sat, 20 Apr 1996 18:32:39 -0500 (EST)
Date: Sat, 20 Apr 1996 18:32:39 -0500 (EST)
From: Liza Blaney <blaneyl>
Message-Id: <199604202332.SAA20969@xinu2.cs.purdue.edu>
Content-Type: text
To: undisclosed-recipients:;
Status: R
Content-Length: 246

Actually, I am finding that even from home, compiling into a file, them
going back to xinu2 to look at it is not too bad. It is especially ok
if xinuserver is not too busy... Don't worry about previous request.
I am making progress.

Thank. Liza

From lcheng  Sat Apr 20 22:49:14 1996
Return-Path: lcheng@cs.purdue.edu
Received: from raphael.cs.purdue.edu (lcheng@raphael.cs.purdue.edu [128.211.1.33]) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) with ESMTP id WAA17120; Sat, 20 Apr 1996 22:49:13 -0500 (EST)
Received: (from lcheng@localhost) by raphael.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) id WAA01090 for 603; Sat, 20 Apr 1996 22:48:43 -0500 (EST)
From: Lebin Cheng <lcheng>
Message-Id: <199604210348.WAA01090@raphael.cs.purdue.edu>
Subject: A suggestion
To: 603
Date: Sat, 20 Apr 1996 22:48:42 -0500 (EST)
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Status: R
Content-Length: 1037



	Hi, comerades, :-)

	To finish the Orbix project, we all need to create a couple of
	servers in the Implemenation Repository. Since we all share
	the IR on xinuserver, I suggest everyone creates his/her own
	directory under the root of IR. 

	This is easy to do: for example, I want to have my own name
	space in IR (on xinuserver) I do: 
	1. mkdirit lebin (this creates a "directory" called lebin)
	2. prefix the my server names with lebin/, for instance: 
		in the client prog: 
		...
		_bind(":lebin/testsrv",...) // instead of _bind("testsrv")
		
		in the srv prog:
		...
		CORBA::Orbix.impl_is_ready("lebin/testsrv",...) 
		// instead of just testsrv

		and run the putit as: 
		putit -hxinuserver lebin/testsrv ...

	Obviously, you may replace "lebin" with a name of your own preference
	when you try the example. 

	By doing this, we can all have our own name spaces for our servers and 
	avoid the hassles of having to use odd names such as "Bank_lebin_test1", 
	making the IR root crowded. 

	Thanks. 
	--Lebin
	lcheng@cs

	

From grr  Mon Apr 22 10:54:14 1996
Return-Path: grr
Received: (from grr@localhost) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) id KAA24911; Mon, 22 Apr 1996 10:53:26 -0500 (EST)
Date: Mon, 22 Apr 1996 10:53:26 -0500 (EST)
From: Gustavo Rodriguez-Rivera <grr>
Message-Id: <199604221553.KAA24911@ector.cs.purdue.edu>
To: 603, grr
Subject: tests for proj 3
Content-Length: 739

> My project3 worked fine for the Client_main (6 tests) you provided.
> Is that enough?

The test program I gave you does not test exaustively all the different 
features. Passing the six tests is just a baseline. After your
server passes the six tests I would say it is 80% done. 

You can add more features to the server and write your 
own test programs. You can add more exceptions, more 
validations etc. There are no specifications for this.
You will create your own specifications.

IMPORTANT:
You will demonstrate project2 and project3 to me on 
Thursday May 2nd, and Friday May 3th. I will post at the door 
of my office the available times so you can choose one. 
Project3 is due at the time of your presentation.

	--Gustavo




From grr  Mon Apr 22 10:57:07 1996
Return-Path: grr
Received: (from grr@localhost) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) id KAA25150; Mon, 22 Apr 1996 10:55:53 -0500 (EST)
Date: Mon, 22 Apr 1996 10:55:53 -0500 (EST)
From: Gustavo Rodriguez-Rivera <grr>
Message-Id: <199604221555.KAA25150@ector.cs.purdue.edu>
To: 603, grr
Subject: How to unregister...
Content-Length: 135

> How to unregister a server from the repository? 

You can wait until the server times out or kill
the server explicitly.

	--Gustavo

From grr  Mon Apr 22 10:57:42 1996
Return-Path: grr
Received: (from grr@localhost) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) id KAA25501; Mon, 22 Apr 1996 10:56:53 -0500 (EST)
Date: Mon, 22 Apr 1996 10:56:53 -0500 (EST)
From: Gustavo Rodriguez-Rivera <grr>
Message-Id: <199604221556.KAA25501@ector.cs.purdue.edu>
To: 603, grr
Subject: Re: corbix
Status: R
Content-Length: 512

> When I run my program the first time, it can pass the 6 tests, but when I run
> it the second time immediately following the first, it will fail because those
> objects are still alive in the server(for example if we want to do creating
> the same account, we will get user exception error), but after sometime, I can
> run my program again I think this is because the timeout of those objects.
> Do we have to modify the client code to deal with this problem? Thanks.

It would not be a bad idea.

	--Gustavo

From huz  Tue Apr 23 09:09:16 1996
Return-Path: huz@cs.purdue.edu
Received: from xinu14.cs.purdue.edu (huz@xinu14.cs.purdue.edu [128.10.3.114]) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) with ESMTP id JAA03994; Tue, 23 Apr 1996 09:09:15 -0500 (EST)
Received: (from huz@localhost) by xinu14.cs.purdue.edu (8.7.3/PURDUE_CS-1.4) id JAA04739 for 603; Tue, 23 Apr 1996 09:05:28 -0500 (EST)
From: Zhenjun Hu <huz>
Message-Id: <199604231405.JAA04739@xinu14.cs.purdue.edu>
Subject: rerun
To: 603
Date: Tue, 23 Apr 1996 09:05:28 -0500 (EST)
X-Mailer: ELM [version 2.4 PL25]
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Status: R
Content-Length: 141



Hi, Guys,
 In order to rerun your client after the first run, you may delete all the
 accounts in the bank at the end of client code.
 huz

From grr  Tue Apr 23 15:35:31 1996
Return-Path: grr
Received: (from grr@localhost) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) id PAA27633; Tue, 23 Apr 1996 15:34:45 -0500 (EST)
Date: Tue, 23 Apr 1996 15:34:45 -0500 (EST)
From: Gustavo Rodriguez-Rivera <grr>
Message-Id: <199604232034.PAA27633@ector.cs.purdue.edu>
To: 603, grr
Subject: Presentation times...
Status: R
Content-Length: 311

I have posted on my door (CS274) the possible times for the
presentations. Please stop by and sign up for one (one time 
for each team).

The presentations will last 20 minutes and are Thursday May 2nd
and Friday May 3th from 10:00-12:00 and 1:00-5:00.
You will be presenting project2 and project3.

	--Gustavo

From blaneyl  Tue Apr 23 16:21:28 1996
Return-Path: blaneyl@cs.purdue.edu
Received: from tristram.cs.purdue.edu (blaneyl@tristram.cs.purdue.edu [128.211.1.28]) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) with ESMTP id QAA03563; Tue, 23 Apr 1996 16:21:27 -0500 (EST)
Received: (from blaneyl@localhost) by tristram.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) id QAA00651; Tue, 23 Apr 1996 16:20:45 -0500 (EST)
Date: Tue, 23 Apr 1996 16:20:45 -0500 (EST)
Message-Id: <199604232120.QAA00651@tristram.cs.purdue.edu>
From: Liza Blaney <blaneyl>
To: 603
Subject: Two more tests of project 3, including a test of delete
Status: R
Content-Length: 1864


// To call insert into ClientMain.C
//
//	testn(7,bank);
//	testn(8,bank);


void testn(int n, Bank* bank) {
	//
	// Testn - testing function
	//
#define FALSE 0
#define TRUE 1
	cout << "Test " << n << endl;
	int err = FALSE;
	int rej = FALSE;
	Account * account;
	float limit = 0;
	CheckingAccount * checkingAccount = 0;
	float newBalanceChecking = 0;
	float newBalanceSavings = 0;
	float interest = 0;
	SavingsAccount * savingsAccount = 0;
	TRY {
	  switch (n) {
	  case 7:		// test hashing list
		savingsAccount =
			bank->newSavingsAccount( "Pat", 8, 1500.00, IT_X );	
		savingsAccount->makeWithdrawal( 200.00, IT_X );
		savingsAccount =
			bank->newSavingsAccount( "aPt", 8, 1500.00, IT_X );	
		savingsAccount->makeWithdrawal( 100.00, IT_X );
		savingsAccount =
			bank->newSavingsAccount( "tPa", 8, 1500.00, IT_X );	
		savingsAccount =
			bank->newSavingsAccount( "atP", 8, 1500.00, IT_X );	
		savingsAccount =
			bank->newSavingsAccount( "taP", 8, 1500.00, IT_X );	
		account = bank->lookUp( "aPt", IT_X );
		newBalanceSavings = account->balance( IT_X );
	    break;
	  case 8:		// test delete
	        account = bank->lookUp( "aPt", IT_X );
	        bank->deleteAccount(account, IT_X);
	    break;
	  default:
	    err = TRUE;
	    break;
	  }

	}
	NONE {
	}
	CATCH ( Reject, r ) {
	  cerr << "Reject reason:" << form("%s", r->reason) << endl;
	  rej = TRUE;
	}
	CATCHANY {
    		cerr << "Test " << n << " failed" << endl;
    		cerr << "Unexpected exception " << IT_X << endl;
		err = TRUE;
  	}
	ENDTRY
	  switch (n) {
	  case 7:
	    if ((account==NULL) || (newBalanceSavings != 1400.00))
	      err = TRUE;
	    break;
	  case 8:
	    if (rej)
	      err = TRUE;
	    break;
	  default:
	    err = TRUE;
	    break;
	  }

	if (!err)
	  {
		cout << "    Test " << n << " O.K." << endl;
	}
	else {
		cout << "    Test " << n << " failed" << endl;
	}

}

From grr  Mon Apr 29 12:00:04 1996
Return-Path: grr
Received: (from grr@localhost) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) id LAA26437; Mon, 29 Apr 1996 11:59:16 -0500 (EST)
Date: Mon, 29 Apr 1996 11:59:16 -0500 (EST)
From: Gustavo Rodriguez-Rivera <grr>
Message-Id: <199604291659.LAA26437@ector.cs.purdue.edu>
To: kapadia@ecn.purdue.edu
Subject: Re: Project Question...
Cc: 603, grr
Status: R
Content-Length: 728

--- Included message -----

        A question regarding C++ - the server functions all return values
of the type "CheckingAccount *", "SavingsAccount *", etc. But the
implementation classes are named "CheckingAccount_i", etc. When I create
a new checking account, I am not able to convert the return pointer to the
appropriate type (causing a marshalling error at runtime). I don't have that
problem for the generic account.

"BANK_i.C", line 170: error: no standard conversion of CheckingAccount_i* to CheckingAccount*


        Any suggestions??

--- End included message

Maybe your inheritance tree is wrong. Check chapter 6 of the Orbix
"Programmer's Guide" that describes inheritance. It has some examples.

	--Gustavo  

From grr  Mon Apr 29 12:11:38 1996
Return-Path: grr
Received: (from grr@localhost) by ector.cs.purdue.edu (8.7.4/PURDUE_CS-1.4) id MAA27153; Mon, 29 Apr 1996 12:10:52 -0500 (EST)
Date: Mon, 29 Apr 1996 12:10:52 -0500 (EST)
From: Gustavo Rodriguez-Rivera <grr>
Message-Id: <199604291710.MAA27153@ector.cs.purdue.edu>
To: kapadia@ecn.purdue.edu
Subject: Re: Question...
Cc: 603, grr
Status: R
Content-Length: 369

>         Are we allowed to use a combination of the BOAImpl and the TIE
> approaches??

	As long as the client works I don't mind. I just recommended
BOAImpl because it was easier, and it is the way I implemented the project. 

	Several people who have their projects running have 
used BOAImpl. However using TIE may not be as difficult as it looks like.

	--Gustavo

