Win a copy of Fixing your Scrum this week in the Agile forum!
  • 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
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

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.
 
No, tomorrow we rule the world! With this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic