Thank you very much for your replay :)
I have just managed to solve this problem.
There were 2 problems.
First, jndi lookup in Test.java in bgsw.ear should be like this:
| BoardGamesServiceFacade bgsf = (BoardGamesServiceFacade)
ctx.lookup("bgsc/BoardGamesServiceFacadeBean/remote");
|
In bgsw.ear I know definition of BoardGamesServiceFacade interface, because I imported a
jar file to bgsw.ear, which contains needed classes.
I guess that this is not the only way to do this.
Second, jndi bindings whare not refreshed properly? I'm not sure. Now in jmx-console I
can see:
| +- bgsc (class: org.jnp.interfaces.NamingContext)
| | +- BoardGamesBean (class: org.jnp.interfaces.NamingContext)
| | | +- local (proxy: $Proxy67 implements interface
lmierzej.bgsc.businessMethods.BoardGames,interface org.jboss.ejb3.JBossProxy,interface
javax.ejb.EJBLocalObject)
| | +- BoardGamesServiceFacadeBean (class: org.jnp.interfaces.NamingContext)
| | | +- remote (proxy: $Proxy69 implements interface
lmierzej.bgsc.businessMethods.BoardGamesServiceFacade,interface
org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBObject)
|
But now I have new doubts...
I have 2 different ear archives (the same JBoss server), in both I make jndi lookups...
Why they are serching/using the same bindigs (the same context)? How they know that they
should use the same?
Finally, what if had every ear on different JBoss server? How form first ear (on first
server) would I get access to second ear (on second server)? How would they both knew now
to use the same jndi context? Is there any additional configuration needed to do this?
P.S. Sorry for my english... really.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978111#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...