[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New problem



Tim Brown wrote:
> 
> This one is difficult to describe but I will try...
> 
> I have a call from my game server like:
> 
>     raceImpl_Int rc;
>     ... get rc
>     rc.sendMail(Integer fr, Integer fg,  Integer r, Integer
Ha... seems like you need primitive types. I have finished this yesterday ;)

> g, String text); // prototype shown for clarity
>     ^^ at this point the String text has a value...
> 
>     In raceImpl:
>     System.err.println("text-" + text);
>     ^^ at this point text = null !!
> 
>     I have debugged the hell out of it and my info is
> accurate..  The other parameters are OK.
Hmmm.. wait a moment, I will check this... [back from my first test] no
problems. I've passed a String as parameter to a proxy method from the client
side. Your game server is a client to the ozone server, right?

But why, if this example code is from the client side, you are using a *Impl
class? On the client there should _only_ be proxies.

>     When I moved the code over to the server and loaded the
> raceImpl_Int mailbox object from there it worked.  This is
> very tedious however.
What does this mean, you have moved the code to the server? If it _is_ a
persistent class, it _must_ be in the server.

> What is wrong with parameter passing?  The proxy object
> looks ok as well.
> 
> If you want to trace through my code in detail it is at:
> http://www.incenter.org/ngb/NEWGB_db.tar.gz
If possible, we should try to figure out what happens by sending one or two
more emails first. (I takes me to much time to understand your code)

> Falko: this is my source as of this bugs happening.  I am
> generally having a ball coding the game.  I have started
> making all objects inside ozone remote objects ozone remote
> as well.  This is how I ran across this bug.
[totally confused] All objects inside ozone implement the OzoneRemote
interface because the remote interfaces extend OzoneRemote... 

Here is a picture about the classes and interfaces to deal with when building
an ozone app. On the left is the server and on the right the client. ~ are
interfaces and - are classes. "Higher" classes/interfaces extend "lower"
ones.


				###########
			   ...>	# OPP     #.............
			  .	###########		.
			 .		^		 .
			.		.		  .
	---------------			.		---------------
	*Impl				.		*Impl_Proxy
	---------------			.		---------------
	   |		\	~~~~~~~~~~~~~~~~~~     /	|
	   |		 -----	<remote interface>  ---		|
	---------------		~~~~~~~~~~~~~~~~~~	---------------
	OzoneObject		   |			OzoneProxy
	---------------		   |			---------------
	   |			~~~~~~~~~~~~~~~~~~
	   |			OzoneRemote
	~~~~~~~~~~~~~~~		~~~~~~~~~~~~~~~~~~
	OzoneCompatible
	~~~~~~~~~~~~~~~

The only thing you have to do is to write your *Impl code and put all methods
that should be accessible from the client in the <remote interface>. OPP
takes *Impl and <remote interface> and generates the proxy class. Then you
can create object in the databse and controll them via proxy because both,
*Impl and *Impl_Proxy implementing the |remote interface>. Thats it.

Tim?


Regards,
Falko
-- 
______________________________________________________________________
Falko Braeutigam                         mailto:falko@softwarebuero.de
softwarebuero m&b (SMB)                    http://www.softwarebuero.de