Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Local Client

 
Jack Lau
Ranch Hand
Posts: 168
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

Could anyone tell me what is the usage of local client? I don't understand what is the usage of local client?

Thanks,
Jack
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not quite sure what your question is. But if it is something like:

"Of what use is a local client in a distributed system (EJB)?", my answer is:

A "local client" of an enterprise bean, i.e. a client that uses local home and component interfaces of an enterprise bean, usually describes another enterprise bean within the same application, for example, a session bean using an entity bean within the same application.

If you want to read up on some EJB deployment options (collocated versus distributed components) read the sample chapter of Expert One-on-One J2EE Design and Development.
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jack Lau:
Hello,

Could anyone tell me what is the usage of local client? I don't understand what is the usage of local client?

Thanks,
Jack


Local client exist in the same VM as the EJB classes. When local clients invoke the EJB it is a plain method unlike the remote calls which involve parameter marshalling /unmarshalling.
 
Ganesh Krishnan
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jack / Pradip,

It doesnt matter whether the client exists in same jvm or not, if u access a ejb remote component interface, its still a remote call.

As Peer rightly said, the local client is one which uses local home and component interfaces of an enterprise bean.

- Ganesh.
SCJP,SBCD,SCEA,BEA Certified Weblogic Administrator.
 
Karthikeyan Varadarajan
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ganesh,

I think Pradip Bhat answer is correct. If you want to use the Local Home and local EJB Object , then the client should be in the same JVM.

Correct me If I am wrong.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Note that the local client can be an EJB or it can easily be a servlet. What is important is that a local client must be in the same app as the bean it calls, ie you must include the client code in the same the EAR file when you build. When you deploy the EAR file, all the code will be in the same JVM. This is essential as local calls involve pass-by-reference, so the local client and the bean providing the local client view must be collocated.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic