EJB sync question

S

SMMT

I'm entering J2EE and I have some questions regarding EJB
From what I understand from tutorials and stuff a remote client aplication
looks for EJB with a findByKey. Let's say two remote clients make the same
request. And both clientes execute the same set method on the object. What
happends ? Wich remote client has priority ? If cliente A makes a
setName("John") and client B makes a setName("Alice") wich name will be
stored in the EJB ? i.e. when a third client makes a getName() , what it
will return ?

Another question regarding.
Imagine I have a java object that is a collection of other objects. Lets say
a group of clients and a client. From what I understand there must be 2 EBJ
one for the client and one for the group. Is this true ?
If yes, they must be Entity JB or the Group object can be a Stateless JB ?

Thank you for your anwsers
 
C

Chiron Paixos

I'm entering J2EE and I have some questions regarding EJB
From what I understand from tutorials and stuff a remote client aplication
looks for EJB with a findByKey. Let's say two remote clients make the same
request. And both clientes execute the same set method on the object. What
happends ? Wich remote client has priority ? If cliente A makes a
setName("John") and client B makes a setName("Alice") wich name will be
stored in the EJB ? i.e. when a third client makes a getName() , what it
will return ?

There is no general answer to this question. The result depends on the
configuration of the EJB-container (aka application-server). You might
want to do a little reading about transactions, isolation levels etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,677
Members
48,796
Latest member
Greg L.

Latest Threads

Top