wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes No share file access Remote-Local Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "No share file access Remote-Local" Watch "No share file access Remote-Local" New topic
Author

No share file access Remote-Local

John Oconnor
Ranch Hand

Joined: Jan 12, 2011
Posts: 66

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


SCJP 5 - OCMJD 6 - OCPJME1MAD(SCMAD)
Roberto Perillo
Bartender

Joined: Dec 28, 2007
Posts: 2258
    
    3

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.


Cheers, Bob "John Lennon" Perillo
SCJP, SCWCD, SCJD, SCBCD - Daileon: A Tool for Enabling Domain Annotations
John Oconnor
Ranch Hand

Joined: Jan 12, 2011
Posts: 66

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
 
 
subject: No share file access Remote-Local
 
Similar Threads
FBN: Closing the database in Network mode.
NX: (HTL) FileChannel & Threads
gui client command line arguments
Data.close() is it needed?
URLyBird: 2 questions