I found this information this morning and tried it ( I'm new to this
obviously ), but it didn't fix the problem. Interesting that the problem
does not occur the first time I invoke it after I have deployed it. I get
this error everytime afterwards, unless I actually re-deploy it and restart
my app server ( weblogic ).
Does this sound familiar to anyone? There must be some clean up task that I
am not performing when I am done with the bean that leaves it in a bad
state.
Scott
-----Original Message-----
From: Kaj Bjurman [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, June 27, 2000 12:02 AM
To: [EMAIL PROTECTED]
Subject: SV: Primary key class in container managed entity bean, int
type
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".
===========================================================================
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".