This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
SCJP5(93%), SCJD(in progress...), SCEA(not started yet...)
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.
Joined: Jul 05, 2007
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.