Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI Dilemma

 
Gaurav Raje
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guys, I have a design question again(Like i havent asked enough already )

For implementing the data class, i have decided to go the roel way by having a singleton class and a layer above the physical layer which will essentially perform the same actions as the data class, just with the "record" objects instead of the string[] defined in the interface(by calling methods from the data class).

Now the question. In order to have network access to the record objects, I am using RMI. So as per the design, most of the methods return record objects or primitives. Record is a serializable class. hence of no problem. But if the RMI Implementation class is used, and if it has an instance variable of type Data, there is no way I can use this.






I understand that if i restructure the code fully, I can achieve what I want without redundant data declarations. My question is, is it a great requirement? since Data is already a singleton, I am not actually creating new objects. So is it a good idea to have Data inside methods and not as an instance field in the recordhandler class?
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, Gaurav!

Champion, I'm not sure if I got your question, but here are some posts that I think that will help you clear your thoughts. Please take a look here, here and here. I think they will be helpful to you!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic