How to configure an EJB client in JBoss EAP 6 / 7.0

Solution Verified - Updated -

Issue

  • How to configure an EJB client in JBoss EAP 6 ?
  • How to use scoped contexts in EJB Client for JBoss EAP 6 ? What are the advantages of scoped context ?
  • How to access a remote EJB in EAP 6?
  • The client is successfully able to communicate with local JBoss hosted EJBs but throws errors while communicating with remote EJBs.
  • What JNDI names should be used in EJB Client for JBoss EAP 6?
  • We have a standalone remote EJB Client calling an EJB deployed in JBoss. But we do not have jboss-ejb-client.properties. Can we specify client properties programmatically in EJB client?
  • Is it possible to call EJBs from separate applications that's backward compatible with JBoss EAP 5.1? How to call EJB from a client in EAP 6?
  • Username and Password is visible while using jboss-ejb-client.properties, Is there any other way to connect the EJB client using xml files?
  • What configuration needs to be done for EJB client authentication in standalone-.xml file in EAP 6?
  • Is it mandatory to set property "jboss.naming.client.ejb.context" to true?
  • How to perform EJB lookup programmatically without using @EJB ?
  • How to configure an EJB client in the migration from EAP 5.1.1 to EAP 6.2?
  • How to invoke an unsecure BeanManage or EJB method in EAP 6 from a remote client?
"javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction".
  • When calling a remote EJB Service within an EJB implementation using TransactionManagementType.CONTAINER we encounter transaction management issues (ARJUNA016053: Could not commit transaction) when the ejbRootNamingContext and jndiContext are closed. Not invoking the context close statements lead to remoting3.ProtocolExceptions complaining about too many open channels.
  • The EJB transaction policy is set to CONTAINER which delegates all the transaction handling to the JBOSS EJB container. The application itself does not do any transaction handling.
  • Could it be that this particular part is still buggy in JBOSS 6.3.0 and the bug that was fixed for 6.1.1 was only done for other transaction policies?
  • Seeing this exception on client:
Exception in thread "main" java.lang.NullPointerException
        at org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver.<init>(RemotingConnectionEJBReceiver.java:102)
  • Unable to do EJB remote lookup, getting NameNotFoundException on jndi name. We are trying to get the ejb remote object by providing the below properties to the Initial Context:
Context.INITIAL_CONTEXT_FACTORY -> org.jboss.naming.remote.client.InitialContextFactory
PROVIDER_URL -> remote://localhost:4447
  • We are getting NameNotFoundException on jndi name we are providing.
  • After EJB calls, there are lots of local connections(127.0.0.1) being created and not closed. This is making the server very slow in due course of time.

  • Getting EJBCLIENT000025 Exception during invocation of the EJB

  • How to achieve trust domain in 2 jboss instances, where these 2 instances will not be in cluster mode and where it will be possible to call remote EJB in EAP 6 from an EJB client which is also in EAP 6?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In