Home arrow static arrow Java Programming [Archive] - How to use a class as a repository
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - How to use a class as a repository
This topic has 2 replies on 1 page.

Posts:17
Registered: 6/25/04
How to use a class as a repository  
Aug 2, 2004 3:06 AM



 
Sorry if I write again...but I'm in trouble.

Well I have some info I have to pass from frame to frame; someone some days ago suggested me to use a class (eg. Vector) to keep these info. Ok, but how can I? I use RMI. Client calls login function that retrieves from DB infos and returns a User object to my client...then what can I do?

Thanks and sorry!

Alberto
 

Posts:6,487
Registered: 5/5/04
Re: How to use a class as a repository  
Aug 2, 2004 6:59 AM (reply 1 of 2)



 
You can write an RMI method which accesses the DB and returns a User object.

You could use a Vector or a Collection.synchronizedSet(new HashSet()) to "cache" requests, but this is not absolutely required.

Write the functionality which allows you to obtain a User object remotely first.
 

Posts:17
Registered: 6/25/04
Re: How to use a class as a repository  
Aug 2, 2004 7:32 AM (reply 2 of 2)



 
I finally got it in another (maybe not the best) way thanks!

;)
 
This topic has 2 replies on 1 page.