ejb@glassfish.java.net

Re: AW: Ejb-jar File Requirements

From: Kenneth Saks <Kenneth.Saks_at_Sun.COM>
Date: Fri, 16 Nov 2007 11:31:46 -0500

Hubert, Eric wrote:
> Hi Kenneth, Sahoo, Eve!
>
> thank you very much for your quick replies and sorry for this crappy
> html post. I currently have to use the web access.
>
> Kenneth, your explanation is very clear to me. Short and precise -
> thank you very much! I simply wasn't aware that POJOs annotated with
> @Entity are not considered EJB components in contrast to POJOs
> annotated with @Stateless for example. This was the answer I was
> looking for.
> Maybe my misunderstanding results from many documentations, tutorials
> and posts
It's a very common misunderstanding since the Java Persistence API was
developed as part of the EJB 3.0 JSR. Part of the simplicity of Java
Persistence entities comes from "decomponentizing" them and ensuring
that they can be used independently of EJB components. Of course, it's
still extremely important that they integrate well with Session Beans
and Message-Driven Beans.

Going forward, EJB and the Java Persistence API are being developed
within separate JSRs (318 and 317).
> were Java Persistence Entities are called "EJB 3.0 entity beans" which
> is a somewhat misleading name.
>
> Sahoo, not that you think I aim to make easy things more complicated:
> My actual problem was that I had to port an existing EJB 3.0
> application from JBoss 4.2.x to Glassfish v2. In that application all
> domain objects were packaged in it's own ejb-jar file, which in turn
> was declared as an EJB module in application.xml. I guess just by
> habit as in old 2.x days. Ofcourse this application deployes and runs
> fine in JBoss, but runs into the mentioned deployment error on
> Glassfish. Ofcourse this was quite easy to fix for me. I just wanted
> to know the reasoning behind this. Now I got it.
>
> So Eve, please don't invest time on this. I already knew the source of
> the problem as well as the proper solution, just didn't know the
> rationale behind it.
>
> Hope to see some of you at Java Polis!
Likewise. I'll be presenting on EJB 3.1 and doing a talk with Linda
DeMichiel on EJB 3.0. Hope to see you there!

> Eric