File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Distributed Java and the fly likes Complete Java 2 Cert Study Guide - Distributed Notification Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Complete Java 2 Cert Study Guide - Distributed Notification" Watch "Complete Java 2 Cert Study Guide - Distributed Notification" New topic
Author

Complete Java 2 Cert Study Guide - Distributed Notification

Michael Remijan
Author
Ranch Hand

Joined: May 29, 2002
Posts: 123
    
    5

-Michael
Fist off, great book! It easily prepared me for the programmer exam and now i'm doing my studying for the developers exam.
The section on Distributed Notification really peaked my interest. I'm been playing around with it for a week but haven't gotten it to work yet. I searched this form on "notification", found some previous posts about it, including you mentioning a tutorial. So obvioulsy my question is do you have an example that I can download and run so I can figure out what i've been doing wrong all week?
Thanks,
Mike
mjremijan@yahoo.com
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Hey Michael -
Thanks for the kind words.
On distributed notification: I don't think I have got around yet to writing that part of my tutorial. But if you want to see a full-fledged model in action, the Jini package has one that's not too hard to play with.
It's a difficult model to write from scratch, or at least it turned my brain to jello the first couple times. In short, you're going to set up a remote object on your server, which accepts a parameter in one of its calls. That parameter will come in the form of a client-side remote object, meaning the server-side actually gets a stub.
When the server wants to notify the client of an event, it makes a call on that client stub with a serializable parameter (an actual, honest-to-goodness object) that encapsulates the event information. In this way, the server side thinks it is making a local call for event notification, but the actual recipient is somewhere else!
The code for such a model actually isn't that bad. Getting the setup right, that's difficult when you have to do it by hand.
I promised Marilyn dQ I would revive the tutorial, but I have got to get out of June first. This is the last month of the fiscal year for my biggest client, and my life right now is much like being a tax accountant on April 14th...
[ June 27, 2002: Message edited by: Michael Ernest ]

Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Michael Remijan
Author
Ranch Hand

Joined: May 29, 2002
Posts: 123
    
    5

I've had some inspiration and was able to come up with a solution. I don't know if it is the best solution but it I think the desing is very reasonable. I've got a small demo posted on my website
http://www.geocities.com/mjremijan/TimeServer.zip
I'd be interested if you have any comments.
Originally posted by Michael Ernest:
Hey Michael -
Thanks for the kind words.
On distributed notification: I don't think I have got around yet to writing that part of my tutorial. But if you want to see a full-fledged model in action, the Jini package has one that's not too hard to play with.
It's a difficult model to write from scratch, or at least it turned my brain to jello the first couple times. In short, you're going to set up a remote object on your server, which accepts a parameter in one of its calls. That parameter will come in the form of a client-side remote object, meaning the server-side actually gets a stub.
When the server wants to notify the client of an event, it makes a call on that client stub with a serializable parameter (an actual, honest-to-goodness object) that encapsulates the event information. In this way, the server side thinks it is making a local call for event notification, but the actual recipient is somewhere else!
The code for such a model actually isn't that bad. Getting the setup right, that's difficult when you have to do it by hand.
I promised Marilyn dQ I would revive the tutorial, but I have got to get out of June first. This is the last month of the fiscal year for my biggest client, and my life right now is much like being a tax accountant on April 14th...
[ June 27, 2002: Message edited by: Michael Ernest ]
Matt DeLacey
Ranch Hand

Joined: Oct 12, 2000
Posts: 318
Link doesn't work.

With Respect,
Matt
Michael Remijan
Author
Ranch Hand

Joined: May 29, 2002
Posts: 123
    
    5

should be ok now.

Originally posted by Matt DeLacey:
Link doesn't work.

With Respect,
Matt
Matt DeLacey
Ranch Hand

Joined: Oct 12, 2000
Posts: 318
It's not.

With Respect,
Matt
Michael Remijan
Author
Ranch Hand

Joined: May 29, 2002
Posts: 123
    
    5

http://www.geocities.com/mjremijan/TimeServer.zip
I've tried it on 5 different computers and haven't had a problem.
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

It might be an access restriction. I get a "page unavailable for viewing" error.
Michael Remijan
Author
Ranch Hand

Joined: May 29, 2002
Posts: 123
    
    5

I've tried dozen's of times on different computers and I still don't have a problem getting the zip file. I'll try again at home tonight. is there some place on JavaRanch I can put it?
Originally posted by Michael Ernest:
It might be an access restriction. I get a "page unavailable for viewing" error.
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
I am getting "This page is not available".
If we put it on JR temporarily, for, say, a week, will it work? How big is your zip? You can try to send it to me on margar@mail.ru and we see if it's bigger than my mail box
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
It's on http://www.javaranch.com/test/timeserver.zip
so everybody interested are welcome...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Complete Java 2 Cert Study Guide - Distributed Notification