• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

EJB CMP Commiting problem  RSS feed

 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hii all,
I am using ejbs ,i am facing a problem....i called ejbcreate and after that i an executing a query which will get the values which i created earlier but i am not getting results correctly...what i understood is commit is not happening,is there any procedure to explicitly commit ejb operatins and then get the results after that.Actually our design pattern is a stateless session bean calls a service class which calls ejbs creates and so on...the actual commit is done in stateless session bean but im trying to create and execute query in service class before commit is happened.can any one solve my problem.
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I m not able to understand that why you are executing query to reteive the value which u have created earlier,
When you insert new record using CMP/BMP by calling ejbCreate(), it return the Component object using that object u can reterive all values
And i tell u why are not getting the result properly,
See application server actually insert/save record into database when the underlying transcation is being commited.
its helps application server when any transcation is roll back
if doesn't solve ur problem then i will suggest u use BMT
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!