geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xh <>
Subject Re: AW: G1.1 to G2.0-M6 migration: JNDI problems
Date Tue, 17 Jul 2007 12:29:11 GMT
Hi All!

I'm making some progress with migrating from G1.1 to G2.0, 
It was a hell easier to migrate from JBoss to WebSphere Application Server Community Edition
(based on G1.1) than to migrate from 1.1 to 2.0 ;( 

I've changed the @Stateful to @Stateless and now I can see my bean in:

but few things still don't work, like accessing remote interface through JNDI

as a continuation of previous reply:

- you 
deployed a EJB 3.0 application in an xxx-ejb.jar

I deployed my EJB 3.0 application as an *.ear, but the extension is not important at all

- you 
configured an openejb-jar.xml deployment plan where you set an artifactId for 
your app, let's say "MyApp"

just as said here:

"By annotating this class as a @Stateless session there is no need for a deployment descriptor
to describe it separately."

my EJB module does not  have any ejb-jar.xml or openejb-jar.xml

- you 
have build a remote interface for your session bean (EJB 3.0 means a simple 
interface), let's say "MySessionRemote"

then the following is the right jndi name to get a 
connection to your bean


I have built @Local and @Remote interfaces

I don't have openejb-jar.xml file with artefactId elements, thus I use the artifactId from

I'm trying to fetch the remote interface with this code:
            Context c = new InitialContext(p);
            // don't have to redeploy it each time I want test new JNDI name
            // it is extracted from URL parameter s
            if (request.getParameterMap().get("s") != null) {
                s = ((String[])request.getParameterMap().get("s"))[0];
            Object o = c.lookup(s + ModuleProxyRemote.class.getName());
            if (o != null) {

always throws an exception, NameNotFound

in the http://localhost:8080/console/portal/DebugViews/DebugViews_JNDIViewer
I can see that there is my application:
+ org.xh.jee.ejb3.samples/EJB3Test/1184674652609/ear
   - EJBModule
     - EJB3EJB.jar
        - SessionBeans
          - ModuleProxyBean

local interface works without any problems, its annoted with @EJB:

private ModuleProxyLocal proxy = null;

proxy.initialize("this is only", "a local test");

any ideas?

best regards

What kind of emailer are you? Find out today - get a free analysis of your email personality.
Take the quiz at the Yahoo! Mail Championship.* 
View raw message