• Jboss7.1 local EJB lookup problem


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

     

    java.lang.ClassCastException: org.jboss.ejb.client.naming.ejb.EjbNamingContext cannot be cast to com.transaction.ITransaction

     

    We are 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 do 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 will show what JNDI name to use for the lookup.

  • 相关阅读:
    转 IDEA 解决代码提示功能消失
    模态框居中显示
    DetachedCriteria和Criteria的使用方法
    struts2配置文件详解
    springMVC上传图片
    在linux下运行mongodb
    webSocket客服在线交谈
    接口自动化
    easyui input文本框清除值
    Spring总结
  • 原文地址:https://www.cnblogs.com/firstdream/p/9797797.html
Copyright © 2020-2023  润新知