RMI is the way to go. Definitely.
iamthwee
Posting Expert
5,950 posts since Aug 2005
Reputation Points: 1,543
Solved Threads: 439
J2EE is also designed for such things, but it can be a pretty heavy architecture for a simple client-server app.
Ezzaral
Posting Genius
15,985 posts since May 2007
Reputation Points: 3,250
Solved Threads: 847
why reinvent the wheel when there are perfectly good solutions like Hibernate and Spring already out there?
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
No, Hibernate abstracts away all that nitty gritty JDBC code to access the database.
http://www.hibernate.org
You shouldn't care whether you're talking through RMI or whatever, use an existing system to worry about that.
Spring makes for a lot of very nice capabilities. http://www.springframework.org/
jwenting
duckman
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
Depending on your application one of the 2 approaches can be chosen.. If you have enough complexity in DB parts OR more than one servers connecting to DB layer, you might want to have database server separately..
In anycase as Ezzarel pointed out J2EE is designed EXACTLY for this purpose.. See this architecture diagram .. it's not mandatory to have 2 physically different machines for J2EE and DB server, both can be on one machine..
thekashyap
Practically a Posting Shark
811 posts since Feb 2007
Reputation Points: 254
Solved Threads: 75