Local Interface (javax.naming.NameNotFoundExcepti)
Hi All,
I'm trying to use a local interface in session bean. But at run-time it is throwing an exception javax.naming.NameNotFoundException :(
Same program works fine if we use remote interface. Here i'm showing ejb-jar.xml file
----------------------------------------------------------------------
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<display-name>LocalInterfaceJAR</display-name>
<enterprise-beans>
<session>
<display-name>SimpleSessionEJB</display-name>
<ejb-name>SimpleSessionEJB</ejb-name> <local-home>beans.SimpleSessionHome</local-home> <local>beans.SimpleSession</local>
<ejb-class>beans.SimpleSessionBean</ejb-class> <session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
<ejb-local-ref>
<ejb-ref-name>ejb/beans.SimpleSession</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>beans.SimpleSessionHome</local-home>
<local>beans.SimpleSession</local>
<ejb-link>SimpleSessionEJB</ejb-link>
</ejb-local-ref>
<security-identity>
<description></description>
<use-caller-identity></use-caller-identity>
</security-identity>
</session>
</enterprise-beans>
<assembly-descriptor>
<method-permission>
<unchecked />
<method>
<ejb-name>SimpleSessionEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>getEchoString</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</method>
<method>
<ejb-name>SimpleSessionEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>getPrimaryKey</method-name>
<method-params />
</method>
<method>
<ejb-name>SimpleSessionEJB</ejb-name>
<method-intf>Local</method-intf> <method-name>getEJBLocalHome</method-name>
<method-params />
</method>
<method>
<ejb-name>SimpleSessionEJB</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>java.lang.Object</method-param>
</method-params>
</method>
<method>
<ejb-name>SimpleSessionEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>remove</method-name>
<method-params />
</method>
<method>
<ejb-name>SimpleSessionEJB</ejb-name>
<method-intf>Local</method-intf>
<method-name>isIdentical</method-name>
<method-params>
<method-param>javax.ejb.EJBLocalObject</method-param>
</method-params>
</method>
<method>
<ejb-name>SimpleSessionEJB</ejb-name>
<method-intf>LocalHome</method-intf>
<method-name>create</method-name>
<method-params />
</method>
</method-permission>
</assembly-descriptor>
</ejb-jar>
----------------------------------------------------------------------
Plz send solution
Thanks in advance :)
|