• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

SessionSynchronization interface ?? PlS help

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When we using session Syn.. Interface in CMT stateful session beans

How do we implement ?? Is that implimented by container ?

Let say "afterBegin()" method. Is that call inside a method ? Or we need to code explicitly.

Please my idea about like this Tell is that correct or not ?

Inside CMT bean
.. someMethod(){
.....
........
ss.afterBegin();
this.method1(); <-- metod 1 & 2 are in Transaction context
this.method2(); <--

ss.beforCompleation();
ss.afterCompleation(true);
}



Or PLEASE LET ME SHOW VERY SIMPLE CODE
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

SessionSynchronization interface can be optionally implemented by a CMT Stateful Session bean. The 3 methods of this interface are container callback methods, meaning that the container will call these methods at the appropriate time during a transaction and execute any code you have written in them. These methods can be used to know the transaction boundaries for a CMT bean.

Below is an outline:


What functionality can be put into these 3 methods can be found in the spec on page 74. Also in HFE.
 
I have gone to look for myself. If I should return before I get back, keep me here with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic