Result:
01:53:34,703 INFO [EARDeployer] Started
J2EE application: file:/E:/DJ/Certifi
01:53:38,484 INFO [STDOUT] Enter:HelloUserBean.init(***** N E W *****)
01:53:38,484 INFO [STDOUT] [PostConstruct]
01:53:38,484 INFO [STDOUT] Exit:HelloUserBean.init()
01:53:38,484 INFO [STDOUT] Enter:HelloUserBean.sayHello()
01:53:38,484 INFO [STDOUT] Exit:HelloUserBean.sayHello()
The following rules from the bean proovider responsibilites described in EJB Core specification 4.6.2 secontion
are violated by the above code, and yet it works correctly.
1) The class must be defined as public, must not be final, and must not be abstract: The
class must be a top level class. HelloUserBean is final, this is observed for both stateless
and stateful session beans.
2) The class must not define the finalize() method: HelloUserBean has finalize(), this is observed
for both stateless and stateful session beans.
3) A session bean class must not have a superclass that is itself a session bean class: HelloUserBean
extends WelcomeBean and both are session beans.
Can someone explain the why EJB 3.0 Core Specification is violated ?
****************************************
---------------
Environment
---------------
EJB Version : 3.0
Application Server:
JBOSS 4.2.3.GA
J2SE: 1.5 or 5.0
OS: Windows XP
****************************************