• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Missed PreDestroy Calls

 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
****************************************
 
Joe Harry
Ranch Hand
Posts: 10124
3
Eclipse IDE Mac PPC Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which is your method in the code marked for PreDestroy callback? Can you post the complete code please?
 
Deepak Jain
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the PreDestroy method


I had used jboss-4.2.3.GA as the application server.
Looks like this is yet another case of jboss-4.2.3.GA violating ejb 3.0 specification.
With so much less time remaining & my request post for selling the Sun Voucher being removed by moderators as "Spam", looks like i definetly started the preparation on a wrong note.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my request post for selling the Sun Voucher being removed by moderators as "Spam"

Really ? Such requests usually end at the Blatant Advertising forum. It's there. Those removed were duplicates.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic