Hi all,
I'm creating a BMP enitybean. I'm confused about the correct way of coding
ejbFindBy & ejbLoad
If I code as below, the number of select statements fired to database is
equal to the number of number of primary keys returned by ejbFindBy
Enumeration ejbFindByXXX( y )
{
execute select .. from abc where x=y
return listOf primaryKeys;
}
ejbLoad()
{
execute select .. from abc where primaryKey=primaryKey.value
}
--------------------------
Instead I want do everything in one query, so I want to do something like
below
Enumeration ejbFindByXXX( y )
{
execute select .. from abc where x=y
create entity beans from the result and add to container
return listOf primaryKeys;
}
ejbLoad()
{
don't do anything
}
Now the doubt is how do I create new entity bean, I don't think I can do new
MyBean(), is there anyway using EJBHome or EntityContext I can achieve this.
If this is not possible, isn't the Entity Bean concept has some serious
performance problem, where as the traditional jdbc program can do this is in
one query?
Ben
This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. No
confidentiality or privilege is waived or lost by any mistransmission.
If you receive this message in error, please immediately delete it and all
copies of it from your system, destroy any hard copies of it and notify the
sender. You must not, directly or indirectly, use, disclose, distribute,
print, or copy any part of this message if you are not the intended
recipient. CREDIT SUISSE GROUP and each of its subsidiaries each reserve
the right to monitor all e-mail communications through its networks. Any
views expressed in this message are those of the individual sender, except
where the message states otherwise and the sender is authorised to state
them to be the views of any such entity.
Unless otherwise stated, any pricing information given in this message is
indicative only, is subject to change and does not constitute an offer to
deal at any price quoted.
Any reference to the terms of executed transactions should be treated as
preliminary only and subject to our formal written confirmation.
===========================================================================
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".