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

URLyBird - about simplify the DBAccess interface to exchange serialized objects

 
Marcelo Camargo
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am studing the sw design to use in my application. My DBAccess interface doesnt provide a bean in its parameters, just arrays!

My first thought was to expose the DBAccess interface as an RMI object. But in this case, the client and the server would exchange serialized arrays parameters, and not an serialized objects (that would be more simple and elegant).

So, I am thinking about create a new facade with more elegant and simple methods, and expose this new facade as my RMI remote object to the client. Than in the server, this facade would talk to the DBAccess object to do its work.

But the client would not see the DBAccess interface, only the simple new facade interface, what would allow me to exchange serialized objects as parameters between the client and the server.

I would like to know your opinion about it...

Thanks a lot,
Marcelo.
 
John Stone
Ranch Hand
Posts: 332
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Marcelo,

welcome to JavaRanch.

I think your approach is OK, many people done it in this way. You may also later find, that you can't expose DBAccess interface in RMI, because you need to handle RemoteExceptions, which couldn't be added.
 
Marcelo Camargo
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you John !
This forum is really amazing.

You are right, I haven't thought about the remote exceptions yet. Now I feel more confident following this way.

Thank you again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic