This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

rethinking my design  RSS feed

subu ananthram
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I started the Rmi part a week ago and like many others I used a factory and a getConnection its got me thinking on the need of the factory method in the first place.

My lock method takes in a recordNo and returns a cookie value,Why not not have the connectionFactory have a simple RemoteInterface with all the business methods and everytime a client tries to connect it gets a cookie value thats how we identify this client and if the client now wants to call any of the business methods it uses this cookie value so its a sort of intelligent client ......
Also now when I thinkof it since I wrap the lock delete update as bookRoom deleteRoom I don't really need a cookie......
Any sort of confused.

If I go ahead with the factory interface I have a couple of issues on that as well...
Lots of ppl in this forum track crashed clients using a weakhashmap with the Data.clas sas the key and the recordNo as the value
so what is the long value that lock returns ???Since I return a new Data object I should be able to use this to generate a long cookie value using this..... ??Am sort of confused....
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!