Hi,
We can even type cast the return type of the findByPrimaryKey method
to an Enumeration without any compilation errors. Infact i experienced the
same.
-Satish
-----Original Message-----
From: Ashwani Kalra [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 19, 2001 1:59 PM
To: [EMAIL PROTECTED]
Subject: Re: EJBObject Conversion!!
Hi,
Only findByPrimaryKey methods return remote reference. Rest of the finders
return the enumeration of the ejbObjects
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Cheers
Ashwani Kalra
Sr. Mem. Dev. Staff
Aithent Technologies
India
www.geocities.com/ashwani_kalra/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----Original Message-----
From: An interest list for Sun Java Center J2EE Pattern Catalog
[mailto:[EMAIL PROTECTED]]On Behalf Of Desai, Gopesh
(Cognizant)
Sent: Wednesday, December 19, 2001 1:27 PM
To: [EMAIL PROTECTED]
Subject: EJBObject Conversion!!
Hi All,
I have a strange beahviour in my application. Can anyone give me the
explaination???
I have a Home Interface as shown below
public interface CompanyHome extends javax.ejb.EJBHome
{
public Company create(CompanyDO companyDO)
throws RemoteException, CreateException;
public Company findByPrimaryKey(CompanyPK compPK)
throws RemoteException, FinderException;
public Company findByCompanyId(CompanyPK companyPK)
throws RemoteException, FinderException;
}// interface CompanyHome
I have client in which i have following lines of codes
CompanyHome m_companyHome = (CompanyHome)
context.lookup(IJNDINames.FO_COMPANY_COMPANY);
Enumeration enum = (Enumeration) m_companyHome.findByCompanyId(companyPK);
findByCompanyId() method returns me Company EJBObject. When i compile my
client code, compiler does not complain me of InCompatible conversion from
Company to Enumeration. Can anyone explain me please????
Regards,
Gopesh Desai << File: InterScan_Disclaimer.txt >>
===========================================================================
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".
This e-mail and any files transmitted with it are for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and
destroy all copies of the original message.
Any unauthorised review, use, disclosure, dissemination, forwarding, printing or
copying of this email or any action taken in reliance on this e-mail is strictly
prohibited and may be unlawful.
Visit us at http://www.cognizant.com