aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes URLyBird - about simplify the DBAccess interface to exchange serialized objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "URLyBird - about simplify the DBAccess interface to exchange serialized objects" Watch "URLyBird - about simplify the DBAccess interface to exchange serialized objects" New topic
Author

URLyBird - about simplify the DBAccess interface to exchange serialized objects

Marcelo Camargo
Ranch Hand

Joined: Jul 05, 2007
Posts: 43
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.


SCJP5(93%), SCJD(in progress...), SCEA(not started yet...)
John Stone
Ranch Hand

Joined: May 04, 2007
Posts: 332
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

Joined: Jul 05, 2007
Posts: 43
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URLyBird - about simplify the DBAccess interface to exchange serialized objects
 
Similar Threads
B&S Design question
Does the lock associate session ID or customer ID?
getConnection throwing NotSerializableException
NX: RemoteDBAccess
Locking strategy with singleton