Two app servers, WAR and EJB
Hello gurus
There are 2 app servers (on different machines!), one with deployed
EJB and another - with deployed WAR. WAR contains EJB client JAR
(interfaces, you know, and other objects mentioned in signatures). In
a servlet (in WAR), trying to narrow MyEJBHome remote reference to
actual MyEJBHome we get ClassCastException - because it uses local
MyEJBHome interface (packed in WAR and loaded by WAR class loader),
but remote MyEJBHome stub refers to remote MyEJBHome interface (loaded
by RMI class loader). Is there any way around this?
TIA,
Sergey
Re: Two app servers, WAR and EJB
Hi Segey,
Locals can be used to access EJBs only within the same
appilcation - ejb-jar or EAR, so local is not going to work
in your case.
The solution to this problem is to make the EJB remote
or package remote interfaces in the war.
Regards,
Slava Imeshev
"Sergey V. Udaltsov" <sergey.oudaltsov@clients.ie> wrote in message
news:6b2b18a6.0308060445.33026af3@posting.google.com...[color=blue]
> Hello gurus
>
> There are 2 app servers (on different machines!), one with deployed
> EJB and another - with deployed WAR. WAR contains EJB client JAR
> (interfaces, you know, and other objects mentioned in signatures). In
> a servlet (in WAR), trying to narrow MyEJBHome remote reference to
> actual MyEJBHome we get ClassCastException - because it uses local
> MyEJBHome interface (packed in WAR and loaded by WAR class loader),
> but remote MyEJBHome stub refers to remote MyEJBHome interface (loaded
> by RMI class loader). Is there any way around this?
>
> TIA,
>
> Sergey[/color]