Use the PK. And the method shouldn't be "change(account, deltas)" it should be "save(AccountLWO)" [LWO=Lightwieght Object]. Your client facade forwards the message to the AccountEBWrapper (what your calling the inner facade). The wrapper pulls the pk (if there is one) and attempt to locate the AccountEB. If one cannot be found, do a create, then update the necessary fields. ...method returns, transaction commits, data is persisted...
Kevin E. Gaasch Panhandle Plains Student Loan Center Software Developer Work: 806.324.4100 x4215 Cell: 806.674.1523 >>> May Charles N <[EMAIL PROTECTED]> 10/16/02 10:28AM >>> Yes, yes, the DATA that is held by the Entities is passed and received as lightweight data objects; that's not in question. It is to-which-entity-that-data-belongs which must be represented that is the focus of my question. For instance, consider a maintenance method to update an Entity Bean called Account: Speaking within EJB space (on the inner session facade), the task is easy: The Inner Session Facade receives a message to change a particular account such as change( account, deltas ) where account is the Account's remote interface and deltas may be some value object or Map telling what fields should change and what their new values should be. Speaking outside EJB space (on the outer session facade) is where the question comes into play: The Outer Session Facade receives a message to change a particular account such as change( account, deltas ) where account somehow specifies which Account is to be changed, and deltas may be some value object or Map telling what fields should change and what their new values should be. 'account' here cannot be a remote interface because it must be able to serialize. So how do we represent the target Account outside EJB space, where we must be able to serialize a representation of 'who' the target Account is? We can use a handle or we can use a primary key. That's the focus of my question. -----Original Message----- From: Tom Janofsky [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 16, 2002 10:10 AM To: May Charles N Subject: Re: [EJB-INT] Session Facade's EB placeholders: PKs or Handles? Charles: Maybe I'm confused about what you're trying to accomplish, but couldn't you successfully model what you're trying to do using a value object pattern on your outer session bean facade, so that clients operate on and return lightweight objects representing the data in the entities? --tom ==========================================================================To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help". =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff EJB-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
