Result:
01:23:26,500 INFO [EARDeployer] Started
J2EE application: file:/E:/DJ/Certifications
01:23:33,390 INFO [STDOUT] Enter:HelloUserBean.setSessionContext()
01:23:33,390 INFO [STDOUT] Exit:HelloUserBean.setSessionContext()
01:23:33,390 INFO [STDOUT] Enter:HelloUserBean.init(***** N E W *****)
01:23:33,390 INFO [STDOUT] [PostConstruct]
01:23:33,390 INFO [STDOUT] Exit:HelloUserBean.init()
01:23:33,390 INFO [STDOUT] Enter:HelloUserBean.afterBegin()
01:23:33,390 INFO [STDOUT] Exit:HelloUserBean.afterBegin()
01:23:33,390 INFO [STDOUT] Enter:HelloUserBean.sayHello()
01:23:33,390 INFO [STDOUT] Enter:HelloUserBean.instanceMethod()()
01:23:33,390 INFO [STDOUT] Exit:HelloUserBean.instanceMethod()()
01:23:33,390 INFO [STDOUT] Enter:HelloUserBean.afterCompletion()
01:23:33,390 INFO [STDOUT] didCommit:false
01:23:33,390 INFO [STDOUT] Exit:HelloUserBean.afterCompletion()
01:23:33,390 INFO [STDOUT] Enter:HelloUserBean.destroy()
01:23:33,421 INFO [STDOUT] [PreDestroy]
01:23:33,421 INFO [STDOUT] Exit:HelloUserBean.destroy()
EJB 3.0 Core Specification:
---------
4.4.3 Missed PreDestroy Calls
A system exception thrown from the instance's method to the container
Questions:
HelloUserBean invokes instanceMethod() from one of the business interface methods, which throws a System exception, As expected the instance is destroyed but the PreDestroy call back is invoked violating specification.
Can someone explain what is happening here.
****************************************
---------------
Environment
---------------
EJB Version : 3.0
Application Server:
JBOSS 4.2.3.GA
J2SE: 1.5 or 5.0
OS: Windows XP
****************************************