tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Blevins <>
Subject Re: Stateless inheritited bean is not found when Interface is not specified
Date Sat, 15 Mar 2008 00:15:42 GMT

On Mar 14, 2008, at 4:29 PM, Karsten Ohme wrote:

> David Blevins schrieb:
>> On Mar 13, 2008, at 10:41 AM, <> <

>> > wrote:
>>> Hello,
>>> NetworkStorageServiceImpl is a Stateless Local Bean.  
>>> AsyncNetworkStorageServiceImpl also, but extends this bean.
>>> When I do this:
>>> public class AsyncNetworkStorageServiceImpl extends  
>>> NetworkStorageServiceImpl
>>> the bean is not found.
>> This one is intentional.  If you want it to be a bean you have to  
>> use an @Stateless annotation on the class or declare it in xml.
>> Section 4.6.2. of EJB 3.0 Core states: "A session bean class must  
>> not have a superclass that is itself a session bean class."
>> The wording is terrible and we are fixing it in the EJB 3.1 spec.   
>> The intended meaning is that you cannot inherit the act of being a  
>> bean.
> No, thats clear. The AsyncNetworkStorageServiceImpl has also the  
> @Stateless Annotation, but is not found. Only if I implement the  
> interface again which should actually be inherited from the parent  
> class, the bean is found. I dont' know why I have to implement the  
> interface again. The Interface does not contain any annotation.
> E.g.:
> Interface Foo
> @Stateless(name="Foo")
> Class FooImpl implements Foo
> @Stateless(name="Bar")
> Class BarImpl extends FooImpl
> The BarImpl is not published in JNDI.

Right.  There are two aspects, the finding of the bean and the finding  
of the interfaces.  Us not finding the interfaces from the super class  
is definitely wrong and I'll make sure it's fixed -- working on it now  
in fact.  The bean itself should be found, though, and you should see  
a line like the following in your log output:

INFO - Created Ejb(deployment-id=AsyncNetworkStorageServiceImpl, ejb- 
name=AsyncNetworkStorageServiceImpl, container=Default Stateless  

Just with no interfaces, it won't get bound into JNDI so you won't see  
any lines like this:

INFO - Jndi(name=Foo) --> Ejb(deployment- 

Should have it all fixed today or tomorrow.


View raw message