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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值