javax.ejb.NoSuchEJBException:EJBCLIENT000079 Eclipse,JBOSS,EJB 3.1

问题描述 投票:0回答:1

javax.ejb.NoSuchEJBException: EJBCLIENT000079 with JBoss 7.1 and Eclipse

我的测试代码与上述帖子中给出的完全相同,并且在同一帖子中也提到了我所面临的问题,但是看不到任何已确认的解决方案。

请让我知道您是否有任何解决方案/想法。

java jboss7.x ejb-3.1
1个回答
0
投票
Properties jndiProperties = new Properties();
jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.remote.client.InitialContextFactory");
jndiProperties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
jndiProperties.put(Context.PROVIDER_URL, "http-remoting://127.0.0.1:8080/"); // double-check IP and PORT of your app server; you may need to use remote+http or remote+https
jndiProperties.put("jboss.naming.client.ejb.context", true);
jndiProperties.put("org.jboss.ejb.client.scoped.context", "true"); 

Context context = new InitialContext(jndiProperties); 
HelloWorld bean=(HelloWorld)context.lookup("/HellowWorldSessionBean/HelloWorldBean!com.sample.ejb.HelloWorld");
© www.soinside.com 2019 - 2024. All rights reserved.