Jboss 具有EJB远程处理的Portlet

Jboss 具有EJB远程处理的Portlet,jboss,liferay,Jboss,Liferay,我在JBoss7.1.1和PostgreSQL上运行Liferay,我将用我的Portlet在其他PC上远程处理EJB。 我使用没有Liferay portlet的web应用程序连接,并且我的web应用程序连接到EJB远程处理 在将portlet部署到liferay之后,我接受了这个错误 15:36:06,508 ERROR [stderr] (http--127.0.0.1-8080-2) java.lang.IllegalStateException: No EJB receiver ava

我在JBoss7.1.1和PostgreSQL上运行Liferay,我将用我的Portlet在其他PC上远程处理EJB。 我使用没有Liferay portlet的web应用程序连接,并且我的web应用程序连接到EJB远程处理 在将portlet部署到liferay之后,我接受了这个错误

15:36:06,508 ERROR [stderr] (http--127.0.0.1-8080-2) java.lang.IllegalStateException: No EJB receiver available for handling [appName:currency-ear,modulename:currency-ejb,distinctname:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@6c8cd6ef 15:36:06,509 ERROR [stderr] (http--127.0.0.1-8080-2) at org.jboss.ejb.client.EJBClientContext.requireEJBReceiver(EJBClientContext.java:584) 我将standalon.xml配置为:

我的代码是:

package views; import ir.jnf.currency.service.currencylog.CurrencyLogServiceRemote; import java.util.Properties; import javax.naming.Context; import javax.naming.InitialContext; public class MainCurrency { public void mainCurrency() { try { Properties properties = new Properties(); properties.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming"); properties.put("jboss.naming.client.ejb.context", true); Context context = new InitialContext(properties); String name = "ejb:currency-ear/currency-ejb/CurrencyLogService!ir.jnf.currency.service.currencylog.CurrencyLogServiceRemote"; CurrencyLogServiceRemote bean = (CurrencyLogServiceRemote) context .lookup(name); System.out.println(bean.currencyLogFindAllRemote()); } catch (Exception e) { e.printStackTrace(); } } }
帮助我。

尝试将web应用程序添加到jboss-ejb-client.xml文件的/web-INF/文件夹中。 此jboss-ejb-client.xml包含ejb客户端配置,这些配置将在ejb调用期间用于查找适当的目标(也称为ejb接收器)

jboss-ejb-client.xml如下所示:

<jboss-ejb-client xmlns="urn:jboss:ejb-client:1.0">
    <client-context>
        <ejb-receivers>
            <remoting-ejb-receiver outbound-connection-ref="remote-ejb-connection"/>
        </ejb-receivers>
    </client-context>
</jboss-ejb-client>
或配置ApplicationRealm:

<security-realm name="ApplicationRealm">
  <authentication>
    <local default-user="$local" allowed-users="*"/>
    <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
  </authentication>
  <authorization>
    <properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
  </authorization>
</security-realm>
另见:


我希望这能有所帮助。

独立jboss和Livray jboss捆绑到envocation ejb之间没有区别。检查部署的war文件,必须将jboss-ejb-client.xml放入客户端应用程序META-INF。

新缺少/未满足的依赖项:service jboss.server.controller.management.security\u realm.ApplicationRealm缺少依赖项:[service jboss.remoting.authentication\u provider.remoting connector]JBAS014776:最新更正的服务:service jboss.server.controller.management.security_realm.ApplicationRealm new available 16:28:14933 INFO[org.jboss.as]JBAS015950:jboss as 7.1.1.Final Brontes于6915分钟停止在Liferay论坛上参考相同的问题。请不要重复这篇文章,并指向其他你自己发布相同问题的地方。我问过自己同样的问题,但这里的人可以回答。我已经检查了所有的方式,但我没有收到一个答案。在多个地点问是可以的,只是给别人一个机会,看看其他地点是否已经得到了答案,并链接到其他地方,你问。
<connector name="remoting-connector" socket-binding="remoting" />
<security-realm name="ApplicationRealm">
  <authentication>
    <local default-user="$local" allowed-users="*"/>
    <properties path="application-users.properties" relative-to="jboss.server.config.dir"/>
  </authentication>
  <authorization>
    <properties path="application-roles.properties" relative-to="jboss.server.config.dir"/>
  </authorization>
</security-realm>