开发者

calling ejb3.0 in action class. application server : websphere7.0 and IDE: RAD7.5

开发者 https://www.devze.com 2023-03-07 14:01 出处:网络
I have written one stateless session bean and deployed in the server. when i tried to access that particular ejb, it\'s throwing error.

I have written one stateless session bean and deployed in the server. when i tried to access that particular ejb, it's throwing error.

Code sample:

TestServiceBeanRemote : Remore bean TestServiceBean : Actual bean

Context context = new InitialContext(); Test开发者_JAVA技巧ServiceBeanRemote test = (TestServiceBeanRemote)context.lookup("com.test.ejb.TestServiceBean"); test.hello("ejb3.0");

Error :

[5/23/11 14:27:00:250 IST] 0000001b SystemErr R javax.naming.NameNotFoundException: Context: gopatilbNode01Cell/nodes/gopatilbNode01/servers/server1, name: com.test.ejb.TestServiceBean: First component in name com.test.ejb.TestServiceBean not found. [Root exception is org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0]

[5/23/11 14:27:00:250 IST] 0000001b SystemErr R at com.ibm.ws.naming.jndicos.CNContextImpl.mapNotFoundException(CNContextImpl.java:4365)

**: Do i need to configure anything in was7.0 ? or do i need to write any xml file for jndi lookup in ejb3.0 ? please help.


The default bindings in WebSphere Application Server are the interface name (e.g., com.test.ejb.TestService) and <app>/<module>/<bean>#<interface> (e.g., MyTest.ear/test.jar/TestServiceBean#com.test.ejb.TestService). These can be changed during the deploy process or using ibm-ejb-jar-bnd.xml. More information is available in the EJB 3.0 application bindings overview InfoCenter topic.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号