Alex,

The create method looks liks this 


  |     public void ejbCreate( UOID uoid )
  |         throws CreateException
  |     {
  |         setUp(  );
  |         try
  |         {
  |             log.trace( "create Weight entity ejbCreate(" + uoid + ")" );
  |             DMWeightEJBLocal entity = entityHome.findByPrimaryKey( uoid );
  | 
  |             this.uoid = uoid;
  |             setMediator( entity );
  |         }
  |         catch ( FinderException e )
  |         {
  |             throw new CreateException( "Weight: UOID " + uoid.getId(  ) + "not 
found" );
  |         }
  |     }
  | 

It basically just makes sure the entity is available for the other methods. It then 
creates a mediator object to handle the getters and setters (this code is generated by 
Uni-d, an OSS project which (amongst other things) allows the creation of beans with 
inheritance). The mediator handles the inheritance dependencies.

The setSale is rather complex, but in short, it a certain condition is met, a finder 
on the entity beans is called and the state in these entity beans is modified. It is 
that change which is not visible.

I assume I could fix this by not caching the entity object, but by doing 
findByPrimaryKey each time I need it. However, this seems to be a very inefficient way 
to do things.

Joachim

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3828046#3828046

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3828046


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to