• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

B&S: RMI & Lock Questions

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all and good day

I'm testing my solution for release , but, I have some question...

RMI
If I start my Server on localhost, and then, I start the Client on localhost, all works correctly...
BUT...If I start Server on others PC (some lan), and then, I start the Client on localhost (points on Server) I receive a SecurityException
The Sun specification say don't use ANY Security Manager...
What does this mean?

Lock
I can bring in available ONLY one instance to my database... I specific...
If I start a Server and 2 Client, the lock work correctly... BUT, I start a standalone Client (when Saver is up), and point same database, the previous lock (managed by Server), can't accessible...
The Lock management must be persists between same application runs???
Is possible run more Clients in standalone mode and access to same database???

Thanks, Laura





 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Laura,

Regarding your question about running a standalone client while the server is also running. I have the following in my assignment:


You may assume that at any moment, at most one program is accessing the database file; therefore your locking system only needs to be concerned with multiple concurrent clients of your server.



So that's a scenario that should not happen!

Regards,
Roel
 
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, Laura!!!

I'm testing my solution for release



Awesome!

Let me just see if I understood correctly... are you able to start your server and connect to it from another machine, providing the server's IP address? Are you able to start your server and connect to it from the same machine, providing the IP 127.0.0.1?

For the lock question, you may assume that if you start the application in standalone mode in a machine where the server is already running, one thing should not interfere with the other... so, the locking mechanism of the standalone mode is one thing, and the locking mechanism of the server is another thing.
 
Laura Pecoraro
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roberto,

Ok, about RMI...
If I start Server & Client on same machine (127.0.0.1) all work correctly...
When start Server on 192.168.xxx.yyy and the Client on 127.0.0.1 (but hook the server on 192.168.xxx.yyy) I gets a SecurityException

For Lock... I solve with locking the database file... I assume the only one instance on database is available (Server or Client)

Hi... Laura
 
Roberto Perillo
Bartender
Posts: 2292
3
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey, Laura.

It's kindda' hard to tell what can be wrong with your server, but please take a look here and see if it helps. If it isn't of much help, then please take a look here. I advised many people to follow this tutorial during the server development. I know this works because I followed it when I created my server
 
Laura Pecoraro
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to all (especially Roberto Perillo)

For RMI I solve the problem... make an error during the declaration (lookup) the server

Hi, Laura
 
It is no measure of health to be well adjusted to a profoundly sick society. -Krishnamurti Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic