• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Missed PreDestroy Calls

 
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
****************************************
 
Ranch Hand
Posts: 10198
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic