I was playing around with RMI today, but wasn't able to get it to do
what I wanted. I wanted to use RMI to communicate with an object on
the server that implements javax.swing.table.TableModel, and then use
JDBC inside that object. However, when I run my program, the client
process opens a connection to the database, not the server.
A couple of versions of my code are at
http://www.lmert.com/download/rmi-demo.zip
http://www.lmert.com/download/rmi0demo.zip
In "rmi-demo", I went to the trouble of writing a pair of proxy
classes that basically do nothing but translate RemoteExceptions
to/from RuntimeExceptions. My program still doesn't cause data to go
across the RMI pipe.
Is RMI really any good for building N-tier systems?
--
DLL
joeNOSPAM@BEA.com - 12 Nov 2006 03:22 GMT
On Nov 11, 4:16 pm, as4...@wayne.edu wrote:
> I was playing around with RMI today, but wasn't able to get it to do
> what I wanted. I wanted to use RMI to communicate with an object on
[quoted text clipped - 15 lines]
> --
> DLL
BEA's WebLogic provides (among other things) an RMI-based JDBC driver
which a client can use, as a proxy for real pooled JDBC connections
in the WebLogic server. You can also (better) run JSPs to do the JDBC
in the server and/or register any java serverside object in the
WebLogic
JNDI tree, and talk to it from a remote client. So, yes, all this and
more
can be done.
Joe Weinstein at BEA Systems
John Bailo - 13 Nov 2006 17:11 GMT
> In "rmi-demo", I went to the trouble of writing a pair of proxy
> classes that basically do nothing but translate RemoteExceptions
> to/from RuntimeExceptions. My program still doesn't cause data to go
> across the RMI pipe.
There are a lot of security issues that have to be dealt with to get RMI
to work correctly. These reside in the configuration files.
> Is RMI really any good for building N-tier systems?
RMI is typically used for peer to peer rather than N-tier, which is more
associated with the web/http/services model. It's used for things
like real time update.
Right now there are RMI implementations of AJAX ( see the dojo toolkit )
which are for browser based RMI -- much simpler to use though.
> --
> DLL

Signature
The Texeme Construct
http://you-read-it-here-first.com