Bug 920710

Summary: Entity EJB Locators don't work with map-based EJB client configuration
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jan Martiska <jmartisk>
Component: EJBAssignee: Jaikiran Pai <jpai>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: dimitris, myarboro
Target Milestone: GA   
Target Release: EAP 6.1.1   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-16 20:25:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jan Martiska 2013-03-12 15:19:46 UTC
If you use EJB2 entity beans together with map-based remote EJB client configuration [EJBCLIENT-34], it seems not possible to locate entities using their EJB Home and then use them.

How to reproduce:
- Take org.jboss.as.test.integration.ejb.remote.entity.bmp.BMPRemoteEntityBeanTestCase from basic integration testsuite
- Change it so that it will use a map-based configuration instead of jboss-ejb-client.properties, for example change getHome and getProps methods like this, and add getProps method:

    private BMPHome getHome() throws NamingException {
        return (BMPHome) new InitialContext(getProps()).lookup(

    private DataStore getDataStore() throws NamingException {
        return (DataStore) new InitialContext(getProps()).lookup(

    private Properties getProps() {
        System.setProperty("jboss.ejb.client.properties.skip.classloader.scan", "true");
        Properties props = new Properties();
        props.put("org.jboss.ejb.client.scoped.context", true);
        props.put(Context.URL_PKG_PREFIXES, "org.jboss.ejb.client.naming");
        props.put("endpoint.name", "client");
        props.put("remote.connections", "main");
        props.put("remote.connection.main.host", "localhost");
        props.put("remote.connection.main.port", "4447");
        props.put("remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED", "false");
        return props;

- Run the testcase.

Out of the 9 tests in this testcase, 5 will fail. Those are the ones which access an entity through BMPHome.findByPrimaryKey. Calling this correctly returns a Proxy for remote EJB EntityEJBLocator, but any calls on this proxy will fail with:

java.lang.IllegalStateException: EJBCLIENT000025: No EJB receiver available for handling [appName:ejb-remote-test, moduleName:ejb, distinctName:] combination for invocation context org.jboss.ejb.client.EJBClientInvocationContext@12ca1922

When the testcase uses a jboss-ejb-client.properties file, everything works.

Comment 1 JBoss JIRA Server 2013-03-19 12:19:34 UTC
jaikiran pai <jpai> made a comment on jira EJBCLIENT-70

Pull requests sent

Comment 2 Jan Martiska 2013-08-27 12:58:09 UTC
This is fixed in 6.1.0, but has never gotten past the NEW state. I checked the behavior and indeed it seems to work now.
Setting to VERIFIED in 6.1.0.GA.