• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No share file access Remote-Local

 
John Oconnor
Ranch Hand
Posts: 67
Java Java ME Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a problem.

Iam using a Socket Solution for my remote conection in URLyBird app.

The problem is the next, I start the server, and conect clients in remote mode whit out problems, but when I start a Client in Local Mode, this client(local) not share the same data base file access. This database file access is a Singleton

My database file access is some for remote or local mode. The diference is the conecction Type, the local is directly along the a get instance. and when is remote conecction, when start a new client the conection is solved by server who obtain the same instance for all remotes clients.

Regards , and if is necesary other data say me, is my last problem!.

Jhon
 
Roberto Perillo
Bartender
Posts: 2271
3
Eclipse IDE Java Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy, John!

The problem is the next, I start the server, and conect clients in remote mode whit out problems, but when I start a Client in Local Mode, this client(local) not share the same data base file access.


Hum... client in local mode?

Well champ, the thing is, the application is to be run in only one of the tree modes at a time. So, if it starts as a server, it isn't expected for it to be run in standalone mode as well at the same time in the same machine. In standalone (I think that's what you mean by "client in local mode", right?), it shouldn't use the server code, bypassing it.

So, it isn't necessary to test this scenario.
 
John Oconnor
Ranch Hand
Posts: 67
Java Java ME Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok, i sorry, not is client local, is a stand alone mode.

In this mode, i Bypassed all remote conection or server mode, because obtain a instance of my database file access directly.

ok, I have the problem still, when start up a remote client, and take a register(to make a reserv for a customer), this made a lock on register, but when i am runing the app in stan alone mode at same time, can take the same registry whitout alert about who this registry is lock by another user at moment.the cause is because they aren't share the same database file access. (still when my database file access is a Singleton, ok the server and stand alone mode, work in diferents threads and obtain a diferent instance). I think who is need share the SOME database file access instance(Confirm this please) , for view always the locks registry for all users local or remotes.

Tnks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic