tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Brown" <>
Subject Re: OpenEjb testing EJB 2.1 with websphere jars
Date Thu, 03 Nov 2011 18:23:00 GMT
I've deployed EJB's (created initially for WebSphere) using openejb, and
it worked quite nicely.  I did not have to make any no changes to the
EJB's themselves.  I had a separate class that would do the lookup for
all EJB Remote Homes, and this is the only class I had to change. 
I suspect your problem is with how your EJB client obtains an initial
context for looking up the EJB's.  You will need to use one of the
openejb initial context factory classes rather than an IBM initial
context factory class.  You will need the corresponding jars for openejb
clients rather than IBM WebSphere clients.
Also, be aware that if your EJB's access other EJB's, then you will
need to use the openejb classes to get initial context in the EJB
Module, not just the client module/application.

>>> On 11/3/2011 at  9:55 AM, Alexis Krier <>
Ok I've deployed EJB 2.1  in my JUNIT without problem now
but when I try to deploy EJB created for websphere, I have a strange
error which use some ibm classes.

whereas I have set my exclude like this
p.put("openejb.deployments.classpath.exclude", ".**");
p.put("openejb.deployments.classpath.filter.descriptors", "true");

ejb jar is simple

error is strange with an IBM ref
javax.ejb.EJBException: Cannot obtain a free instance.; nested
exception is:
    java.lang.NoClassDefFoundError: com/ibm/CORBA/iiop/ObjectURL
    at $Proxy46.getBeneficiary(Unknown Source)

I think I'm loading bad librairies but I can't figure out which ones

Thank you


> Message du 02/11/11 23:30
> De : "David Blevins"
> A : 
> Copie à :
> Objet : Re: OpenEjb testing EJB 2.1
> On Nov 2, 2011, at 2:32 PM, Alexis Krier wrote:
> > Hello,
> > I was looking to test my old 2.1 EJB with this example:
> >

> >
> > I have the EJBHome & EJBObject ok
> > but where is my SessionBean? I suppose it is "FriendlyPerson" but
this is not implementing SessionBean.
> >
> > Will I have to modify all my old sessionBeans to match
"FriendlyPerson" way?
> We have full support for EJB 1.1 through 3.1, so you should be able
to test them as they are. That example shows that you can still use EJB
2.x features with an EJB 3.x bean. All EJB 2.x should work fine.
> -David

Une messagerie gratuite, garantie à vie et des services en plus, ça
vous tente ?
Je crée ma boîte mail

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