geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: maven - geronimo 2.0 example build problem
Date Fri, 05 Oct 2007 16:28:18 GMT
I think we're getting tied up in nomenclature.  With ejb3, the only  
ejbs are session beans and mdbs.  Something you annotate with @Entity  
is not an ejb, just a jpa persistent object.  For instance you can  
put them directly in a web app and they will work fine.  You can also  
have "persistence units" with only jpa entities and a persistence.xml  
in them that are referenced through manifest classpath of ejb jars or  
wars.  In any case, a jar with only @Entity classes in it will not be  
recognized as a ejb jar and if you claim it is the ejb deployer will  

hope this helps
david jencks

On Oct 5, 2007, at 1:01 AM, dbrenck wrote:

> djencks wrote:
>> I haven't looked at the phonebook example in great detail but it
>> looks to me like the "entity" uses jpa and is not an ejb 2.x entity
>> bean.  As such, if there are no session beans in the jar, it's no
>> longer an ejb jar.  If there's an application.xml in the ear that
>> claims it is, geronimo will probably object.  If you want to use it
>> as a persistence unit referenced from the war I think you need to put
>> the jar in the ears lib directory or include a manifest classpath
>> entry in the war's META-INF/MANIFEST.MF pointing to the jar.
>> Hope I'm right and that this helps :-)
> Yes, and no :-)
> We got an EntityBean 3.0 class, a SessionBean class and an Interface
> implemented by the SessionBean class.
> JPA is used by the SesionBean (not(!) by the EntityBean)
> This thing works, cause the EntityBean is found/read and written by  
> the
> SessionBean which uses JPA.
> Because the EntityBean uses @Entity and other persistance  
> annotations, it
> should be alright to just remove the SessionBean from the jar (as  
> well as
> it's interface class) and deploy the jar then then.
> When trying/doing so, the deployer crashes with the given (2 posts  
> above)
> exception.
> (Yes, i removed the <class> entry from the persistance.xml too, which
> mentions the SessionBean.
> You can then remove the persistance unit definition, cause no class  
> depends
> on it. I tried both ways: remained it and removed it - no difference.)
> ---
> Apart from the example mentioned above, the deployment exception  
> always
> occurs if an ejb.jar that is to be deployed ONLY contains  
> EntityBeans. Maybe
> that s a hint where I'm going wrong - although I didn't see  
> something in the
> specs for j2ee 5 which sais that any ejb.jar must at least contain one
> SessionBean (if u do add just one SessionBean to the ejb.jar the  
> deployer
> works fine again).
> If someone can setup an example of a simple ejb.jar with just one  
> simple 3.0
> EntityBean class which deploys on his geronimo, I would be happy if  
> he made
> it available for me. So I can check what s wrong with my own  
> ejb.jar or with
> my server.
> Btw. - I'm running this:
> cheers, dirk
> -- 
> View this message in context: 
> geronimo-2.0-example-build-problem-tf4496318s134.html#a13055049
> Sent from the Apache Geronimo - Users mailing list archive at  

View raw message