码迷,mamicode.com
首页 > 其他好文 > 详细

Jboss7.1 local EJB lookup problem

时间:2018-10-16 16:11:47      阅读:347      评论:0      收藏:0      [点我收藏+]

标签:not   either   bsp   from   action   pen   where   ups   show   

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.

Jboss7.1 local EJB lookup problem

标签:not   either   bsp   from   action   pen   where   ups   show   

原文地址:https://www.cnblogs.com/firstdream/p/9797797.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!