Hi Scott,

I'm not sure that is a solution to your problem, but it might be.

I think EJB 1.1 says that the container must use Java RMI-IIOP API,
and in that case you should do your cast like this:

import javax.rmi.PortableRemoteObject;
..
Object o = ctx.lookup("person.PersonHome");
PersonHome phome = (PersonHome) PortableRemoteObject.narrow(o,
PersonHome.class);

/Kaj

~~~~~~~~~ ~~~~ ~~~ ~~ ~ ~  ~   ~
[EMAIL PROTECTED]
+46 70 4200148


> -----Ursprungligt meddelande-----
> Fr�n: Scott Ellis [mailto:[EMAIL PROTECTED]]
> Skickat: Monday, June 26, 2000 11:32 PM
> Till: [EMAIL PROTECTED]
> �mne: Re: Primary key class in container managed entity bean, int type
>
>
> Ok, I have gotten the ejb to deploy correctly, but I am
> getting a class cast
> exception when I am trying to acquire the home interface of
> my person bean.
>
> try
> {
>         System.out.println( "Starting to look for the person bean" );
>         Object o = ctx.lookup( "person.PersonHome" );
>         System.out.println( "Found " + o.getClass().toString() );
>         PersonHome phome = (PersonHome)o;
>         System.out.println( "Found the person home interface" );
> }
> catch( Exception e )
> {
>         ...
> }
>
> The type of class returned by the lookup is
> PersonBeanHomeImpl_ServiceStub
>
> Does this ring a bell for anyone?
>
> Scott
>
> ==============================================================
> =============
> 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".

Reply via email to