Jboss7.1 Local EJB lookup problem

Source: Internet
Author: User

We are trying-to-lookup for a Local EJB in JBoss7.1, but we get a classcast Exception. This local lookup is between the same Server:

Java.lang.ClassCastException:org.jboss.ejb.client.naming.ejb.EjbNamingContext cannot is cast to Com.transaction.ITransaction

We is doing a lookup for the following JNDI name:

Ejb:app/transactionbean!com.transaction.transactionlocal

InitialContext context = new InitialContext ();

Context.lookup (ejb:app/transactionbean!com.transaction.transactionlocal);

Is there any other configuration missing from our side. I Read about Ejb-client.properties does we need this file? or its-only for remote lookups?

You don ' t need ejb:namespace lookup for local EJBs. Use the spec mandated JNDI name scheme (either Java:global, Java:app, java:module depending on the context from where you Want to lookup). The server logs would show what JNDI name to use for the lookup.

Jboss7.1 Local EJB lookup problem

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.