DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    May 2004
    Location
    Flat no:502,Marris Project-A apts,Motinagar,Erragadda,Hyd.
    Posts
    3

    Usage of ArrayList and Vector

    Hi,
    As we know Arraylist is non-synchronised and vector is synchronised.So we normally use Arraylist for multi-user accessing many times.For the same purpose i may not use Vector.For example, i have a session bean in EJB, From this i am calling an entity bean with some results, where in i am sending those reults through one Vector. My question is, is it mean that the retuned results are not accessible my more than a user?In that situations i have to use a ArrayList for multi-user accessing.
    How for it is correct.If the Vector is not suitable for that situation, in which scenarios i can use Vector.
    Please clarify this.

    thanks in advance,

    ravikiran.

  2. #2
    Join Date
    Jul 2004
    Posts
    3
    synchronization is used for maintaining DATA-INTEGRITY in multi-user environment.

    When you dont have multiple users UPDATING / MODIFYING the same collection. you can very well go for a non-synchronized implementation. because here, multiple users ONLY read from the collection

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links