To access
ejb from
servlet follwoing code snippet has been written:
-----------Start--------------
InitialContext init = new InitialContext();
Object objref = init.lookup("CDSAdminJNDI");
CDSAdminHome cdsAdminHome = (CDSAdminHome)PortableRemoteObject.narrow(objref,CDSAdminHome.class);
CDSAdmin cdsAdmin = cdsAdminBean.create();
cdsAdmin.saveCDSAdminRecords(hmAdminParameters);
----------End-----------------
jboss xml file is as follows:
------Start -----------------
<?xml version="1.0" encoding="UTF-8"?>
<jboss>
<enterprise-beans>
<session>
<ejb-name>CDSAdmin</ejb-name>
<jndi-name>CDSAdminJNDI</jndi-name>
</session>
</enterprise-beans>
</jboss>
-------End------------
While accessing this Bean..I get following exception on jboss console:
Exception While accessing EJB: javax.naming.NameNotFoundException: CDSAdminJNDI not bound
Can Any body help where is problem?
Thanks in advance