On Wed, 14 Mar 2001, Mukul Gandhi wrote:
> I have some doubts -
>
> 1. My EJB client is doing,
> Person person = getHome().findByPrimaryKey(new
> PersonPK("1")); where Person is the remote interface.
> And, in my bean class, ejbFindByPrimaryKey method is
> returning PersonPK. This is working fine but i don,t
> understand why, because return types in the client and
> the bean class are different. In books and sample code
> its written like this.
Remember that your client doesn't talk directly to your bean: it talks to
container-generated implementations of your Home and Remote
interfaces. This allows the container to perform transaction, security,
and robustness housekeeping chores for your beans. When your
ejbFindByPrimaryKey returns PersonPK, the container maps that to an
instance of your bean class and calls ejbLoad on that instance, then
arranges for that instance to be wrapped by an implementation of the
bean's remote interface and returns that interface instance. This is a bit
simplified, but I hope it explains what's going on.
>
> 2. I am writing a EJB using BMP with one of the
> business methods as setName(String). In my client when
> I do
> Person person = getHome().findByPrimaryKey(new
> PersonPK("1"));
> person.setName("somename"); I cannot see the database
> getting updated. My ejbStore method has the code to
> update the database. I don,t know why this is not
> working.
>
> Regards
> -mukul
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.com/
>
> ===========================================================================
> 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".
>
--
Dan Christopherson (danch)
nVisia Technical Architect (www.nvisia.com)
Opinions expressed are mine and do not neccessarily reflect any
position or opinion of nVISIA.
---------------------------------------------------------------------------
If you're a capitalist and you have the best goods and they're
free, you don't have to proselytize, you just have to wait.
-Eben Moglen
===========================================================================
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".