my dog learned polymorphism*
The moose likes EJB and other Java EE Technologies and the fly likes Java Thin Application Client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Java Thin Application Client" Watch "Java Thin Application Client" New topic
Author

Java Thin Application Client

Ajai
Ranch Hand

Joined: May 29, 2002
Posts: 198
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
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
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.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Ajai
Ranch Hand

Joined: May 29, 2002
Posts: 198
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
Roger Chung-Wee
Ranch Hand

Joined: Sep 29, 2002
Posts: 1683
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).


SCJP 1.4, SCWCD 1.3, SCBCD 1.3
 
Consider Paul's rocket mass heater.
 
subject: Java Thin Application Client
 
Similar Threads
Websphere Clustered Environment
thin vs thick clients
Java or J2ee client???
J2SE client or J2EE client ?
Can Session EJB play the Web Service role