File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hi need some advice

 
addrian brilianda
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i was noob for using EJB.... exclusively EJB -JPA...... one that i want to ask is that the EJB-JPA is thread safe.. and basicly can someone explain what is thread safe with a simple example and simple word.... i'm tottaly new here..
thanks..
 
Andrew Moko
Ranch Hand
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to go back to your scjp notes. It's a whole topic that can't simply be explained in a sentence.

But, simply put you don't have to worry about implementing your own safety methods just so classes/ methods/ variables are EXCLUSIVE. This mainly achieved by synchronization, wait()/ notify() etc etc.

 
Anurag Verma
Ranch Hand
Posts: 165
Hibernate Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Being "Thread Safe" means that multiple threads can not execute methods of one particular object concurrently. if any thread is executing ANY of the methods of an object, other threads have to wait to execute ANY of the method of that object. (here ANY includes all the methods which are synchronized. for a completely thread safe Object/Class, all methods are supposed to be synchronized but methods from Object class may not be synchronized.)
 
addrian brilianda
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
here.... i tried this things..... i call the method to list the entity from database....... when i press the refresh(F5) button constantly.... it doesn't appear the error... but when i tried the some kind with two machines it's appear error.... why it's happened... and how to solve it???
 
Anurag Verma
Ranch Hand
Posts: 165
Hibernate Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please help me understand how is it related to your previous question???
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic