• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Java Thin Application Client

 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
Can anybody point out the differences and usage of a java thin application client (one that does not run in J2EE client container ) and J2EE application client.
Can I use one for another?
What sort of generic configurations do we need to make on client machine in both these cases to enable these to access remote EJBs?


Thanks
 
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I believe you have your names mixed up. A thin client is a web-based one (i.e. HTML, JSP). A "fat" client is some sort of desktop-based application (e.g. Swing). Either application (thin or fat) will be able to access EJBs. The only differences are matters of deployment, useability, etc. Also, since fat clients are not located with the EJBs, they'll never be able to use local component interfaces.

To use remote EJBs, you will always need to configure your context to connect to a specific host, etc. This can be done in a variety of ways: 1) configure a default jndi.properties file on your classpath, 2) pass a Properties map to the constructor of InitialContext. You'll need to check out your EJB server to see what sort of information to put in that file or that Properties map. At that point, everything else is the same as if you were accessing the EJB from anywhere else.
 
Ajai
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for reply.

I got these terms from an IBM site .
.web page
Both belong to the category of client applications which is diff from web and ejb applications.
I have read some articles which provide some difference like.
Thin client is used for lightwt applications. I can imagine that may be if have a java application ,i will use thin application client and If some GUI then use J2EE application client.
In both cases Application Clients, which provide a stand-alone client run-time environment have to be installed on the client machine.

Can anybody point out some differences which will help me on deciding which one use in a clinet server kind of env. when no. off clients will be accessing EJBs on remote server
 
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A J2EE client of an EJB is normally another EJB or a servlet. Typically, you would build and deploy an EAR file on the EJB Server for both client-side and server-side code. Even if the client is remote, you can gain efficiencies by enabling the EJB Server to pass-by-reference - only possible if the client and the EJB are in the same EAR file and in the same JVM.

The user may be using a browser to send requests to a JSP or servlet and to receive HTML responses. This is a case of a thin client in the sense that the PC will have no client code on it - just the browser. I think this is rather confusing because you can say that there are two clients: the browser (which knows nothing about the EJB) and the servlet (which does know that at least one EJB is servicing requests).

An external client, ie one which is external to the application (which may or may not be outside the EJB Server), must be remote and will have its args passed by value, meaning that objects are copied and passed. This client might be a Java program (possibly Swing), a Web service, an EJB of another application. If there is a client machine such as a PC, it will have code installed in it (a thick client).
 
Who knew that furniture could be so violent? Put this tiny ad out there to see what happens:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic