What is 'Facet' in JavaEE?

Roman picture Roman · Nov 27, 2009 · Viewed 51.6k times · Source

I wonder not only what is Facet but also what is Facet 'in physical level' (as I understand it's not a separate jar, but what?)?

I also wonder how can it affect my application after deploying. I'll explain on real example:

I had 2 facets (which were created by IDE): Spring Facet and Web Facet (for jsf). I deployed it to Tomcat and my application worked fine.

Then I added (by means of IDE) one more facet - JPA Facet. I redeployed application and.. it still worked fine :)

So, I'm just curious what is that and why do we need it?

Answer

BalusC picture BalusC · Nov 27, 2009

This is not Java EE related. This is IDE related. The term is at its own not programming related.

From http://www.thefreedictionary.com/facet

fac·et (fst) n.

  1. One of the flat polished surfaces cut on a gemstone or occurring naturally on a crystal.
  2. Anatomy A small, smooth, flat surface, as on a bone or tooth.
  3. Biology One of the lenslike visual units of a compound eye, as of an insect.
  4. One of numerous aspects, as of a subject. See Synonyms at phase.

It's 4.

In this specific case it's just an aspect which is to be used in the project, so that the IDE can intercept on it with regard to generators, wizards, auto-include libraries and so on. If you add for example the JPA facet, then you will get more options to do the IDE-magic with JPA.