1) you might look at the methods makeClean and makeDirty, which cause ejbStore to get called. i seem to remember being able to override a method to prevent the store from being called.
2) On a different subject, I saw your post reply to one of my questions about the Template project. have you been able to get the template project working as-is (i.e. with same basic classes)? If you have, would it be possible for you to send me a tar or zip of the whole project? I can't get it working for the life of me. my email is firstname.lastname@example.org . thanks for any help.
Thanks for the replies!
I have a few problems with the suggested solutions.
What I do is kind of a feasibility study. That means I try to find out how a certain application could be redesigned/reimplemented in a J2EE environment.
If the decision would be for a J2EE solution then there would be 2 possibilities how the product is used:
a) Our application as a stand alone product
b) Our application integrated with other enterprise software modules that our customer uses in a J2ee environment.
In case a) my favorite solution would be jBoss.
But if the customer uses e.g. IBM web's fear ;-) then any jBoss specific feature would be deadly.
Later in the product lifecycle (performance tuning, etc.) that is maybe acceptable but not in the stage of the feasibility study.
On top of that:
As I understand it (and it's easily possible that that is wrong) you can declare a get method in the entity bean as "read only" or you can declare the whole entity bean as "read only".
But both cases do not match my needs.
Because as I explained in my earlier posting we use value objects to transfer the data to (fat) clients.
The underlying entities change rarely, but they DO change. So to declare the entity "read-only" is not working.
In the case of the findAll method a session bean calls the findAll method of the entity. The session bean gets a collection of all entities.
Then the session bean creates a collection of the appropriate value object class and fills it with the data from the entity beans. When that method finishes the EJB collection is destroyed. And because the entity beans are not "read only" all EJBs in the collection synchronize with the db. And that's my problem :-((
But I think there has to be a clean solution to that (common) problem. And I will look deeper into this (including the "makeClean" method).