Hi,
I have a problem, which I can't solve :( Help really appreciated.
I'm using JBoss 4.0.4.GA-Patch1 (EJB 3.0)
>From JSF backing bean in bgsw.ear I'm trying to access session bean in
>bgsc.ear (remote access, the same JBoss server).
Invoking from bgsw.ear, JSF backing bean - Test.java
| InitialContext ctx = new InitialContext();
| BoardGamesServiceFacade bgsf = (BoardGamesServiceFacade) ctx
| .lookup(BoardGamesServiceFacade.class.getName());
| bgsf.test();
|
Trying to reach bgsc.ear, session's bean interface -
BoardGamesServiceFacade.java (interface)
| @Remote
| public interface BoardGamesServiceFacade {
| public int test();
| }
|
BoardGamesServiceFacadeBean.java (class implementing interface)
| @Stateless
| public class BoardGamesServiceFacadeBean implements BoardGamesServiceFacade
{
|
| public int test() {
| System.out.println("Ok!");
| return 0;
| }
| }
|
I really have no idea how to pass to JSF backing bean Test.java in bgsw.ear the
definition of BoardGamesServiceFacade.java from bgsc.ear?
>From JSF backing bean Test.java in bgsw.ear I'm trying to access
>BoardGamesServiceFacade.java from bgsc.ear, so I need this definition.
I have copied to bgsw.ear "incomplete" BoardGamesServiceFacade.java
| //!NO @Remote annotation!
| public interface BoardGamesServiceFacade {
| public int test();
| }
|
I feel that it's terribly stupid thing to do :( Should I creat some stub from
BoardGamesServiceFacade.java from bgsc.ear?
Anyway I'm getting this error when trying to run:
| javax.naming.NameNotFoundException:
lmierzej.bgsc.businessMethods.BoardGamesServiceFacade not bound
|
jmx-console says:
| | +- BoardGamesServiceFacadeBean (class: org.jnp.interfaces.NamingContext)
| | | +- local (proxy: $Proxy363 implements interface
lmierzej.bgsc.businessMethods.BoardGamesServiceFacade,interface
org.jboss.ejb3.JBossProxy,interface javax.ejb.EJBLocalObject)
| | +- BoardGamesServiceBean (class: org.jnp.interfaces.NamingContext)
|
Does this mean it's local not remote interface bound? Why?
Could You please point me to proper solution?
Is there any good tutorial/example showing remote access (EJB 3.0)?
Thank you for Your help and time.
lmierzej
P.S. Sorry for my english...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3978014#3978014
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3978014
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user