• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to Specify Transaction Attributes for a method

 
Herbert Maosa
Ranch Hand
Posts: 289
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good people,

I am wondering if anyone can educate me on how to specify transaction attributes for methods in BMP entity beans. I have a problem that I think is down to transactions not triggering correctly.

I will describe the problem.

I have an entity bean with say two business methods. Call the methods and

I have a home Collection findAll() method that I use to simply return all instaces of products from the database. I do this by simply putting all the primary keys in the Collection.

In my client, which is a servlet, I successfully execute as such


The code snippet above successfully prints the primarykeys from getPrimaryKey(); prints null from the other two methods. So I was thinking that perhaps my instance variables are not being synchoronised with the database prior to calling those methods.

Anyone to take this up?

Thanks.

Herbert.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!