tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <rmannibu...@gmail.com>
Subject Re: EJB Deployment in TomEE 6
Date Thu, 29 Dec 2016 13:28:15 GMT
Hi

using LocalInitialContextFactory the provider url is ignored (since you do
a local lookup) and the client instance you get is the one from the other
webapp. In the same JVM tomee will optimize the remote calls to but you
should still use org.apache.openejb.client.RemoteInitialContextFactory
instead of the Local one.


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-12-29 5:47 GMT+01:00 sudhish81 <sudhish.yesodharan@ust-global.com>:

> Hi,
> I am working on a migration project moving a legacy system from Websphere
> to
> TomEE. The legacy system  is mainly having EJB2 and EJB 3 specifications.
> This application is wrapped as an EAR which contains two EJB projects and
> one web project. When I deployed this application in TomEE's apps folder, I
> can see all the  EJB's getting registered in the logs. But when I try to
> lookup the EJBs Remote interface withe the registered JNDI name and type
> casting it to java.rmi.Remote , I am getting a class cast exception as
> below
>
> java.lang.ClassCastException: com.sun.proxy.$Proxy85 cannot be cast to
> java.rmi.Remote
>
> I used the below context properties to get the Initial Context
> p.put("java.naming.factory.initial",
> "org.apache.openejb.core.LocalInitialContextFactory");
> p.put("java.naming.provider.url", "http://127.0.0.1:8082/tomee/ejb");
>
> Also if I try to lookup the EJB interface object without typcasting, I can
> see the object in the form
> proxy=fully qualified class name of the Remote interface.
> Since I am struck up with this issue, I cannot proceed further, could any
> one of you help me in resolving this issue
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/EJB-Deployment-in-TomEE-6-tp4680839.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message