• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Client Archive to Application Server

 
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm reading about packaging on pg. 391 of EJB3 in Action.

It mentions "Enterprise Java applications need to be assembled into specific types of JAR files before they can be deployed to an application server." and then goes on to list the various types of archive, including CAR - Client Application Archives.

It then shows an example EAR, which includes a packaged CAR.

META-INF/application.xml
actionBazaar-ejb.jar
actionBazaar.war
actionBazaar-client.jar
lib/actionBazaar-commons.jar



My question, is that if CARs are for Clients, and contain thick clients, why would you be packaging them inside an EAR? I understand that putting it in the EAR might keep everything together, however what does the Application Server do with it (presumably nothing as the code is for clients)?

Thanks,

MG
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thick clients ? It does not contain thick clients. It contains classes necessary to the client, like the beans business interfaces. The server also needs those classes, that's why they are in the ear.
 
Mark Garland
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Christophe,

Thanks for your very quick response.

What you've said makes a lot more sense, but the book would disagree. See the attachment.
Perhaps a new Errata?

Thanks for your help,

MG
EJB3InActionP390.jpeg
[Thumbnail for EJB3InActionP390.jpeg]
EJB In Action P390
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I see. It's different from what I thought. It uses a client application descriptor (application-client.xml). I didn't remember that. This is described here. That page explains that it is convenient to have everything in one ear, so that the server uses only what it needs, and the client also uses only what it needs. It's fully described in the J2EE specification, Chapter EE.9 Application Clients.

I'm not sure that you need to know about it for the SCBCD exam. (I don't think you need to). It's out of the EJB spec.
 
Mark Garland
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Christophe,

Thank you very much for your time and very useful reply.

I think the key sentence is here: "However, it is also possible to include a client module (a JAR file) in an EAR file. This JAR file is only used on the client side; you configure this client module using the application-client.xml deployment descriptor. This scheme makes it possible to package both client and server side modules together. The server looks only at the parts it is interested in (based on the application.xml file) and the client looks only at the parts it is interested in (based on the application-client.xml file). " taken from your link here: http://download.oracle.com/docs/cd/E12840_01/wls/docs103/client/appa.html

That makes perfect sense - thank you for your help,

MG
 
Try 100 things. 2 will work out, but you will never know in advance which 2. This tiny ad might be one:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic