users@glassfish.java.net

Re: Error in JNDI look up using web interface

From: <glassfish_at_javadesktop.org>
Date: Sat, 21 Apr 2007 22:16:59 PDT

i forgot to add generated ejb-jar.xml & sun-ejb-jar.xml

ejb-jar.xml:-

<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" metadata-complete="true" version="3.0" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<enterprise-beans>
<session>
<display-name>CalcBean</display-name>
<ejb-name>CalcBean</ejb-name>
<!-- "mapped-name" is missing -->
<business-remote>pac.Calc</business-remote>
<ejb-class>pac.CalcBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<security-identity>
<use-caller-identity/>
</security-identity>
</session>
</enterprise-beans>
<assembly-descriptor>
<method-permission>
<unchecked/>
<method>
<ejb-name>CalcBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>foo</method-name>
</method>
</method-permission>
</assembly-descriptor>
</ejb-jar>


sun-ejb-jar.xml:-
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 EJB 3.0//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_0-0.dtd">
<sun-ejb-jar>
<enterprise-beans>
<unique-id>77144380919906304</unique-id>
<ejb>
<ejb-name>CalcBean</ejb-name>
<jndi-name>pac.Calc</jndi-name> <!-- i think the error is here -->
<pass-by-reference>false</pass-by-reference>
<is-read-only-bean>false</is-read-only-bean>
<refresh-period-in-seconds>-1</refresh-period-in-seconds>
<cmt-timeout-in-seconds>0</cmt-timeout-in-seconds>
<gen-classes/>
</ejb>
</enterprise-beans>
</sun-ejb-jar>
[Message sent by forum member 'bakr_awad' (bakr_awad)]

http://forums.java.net/jive/thread.jspa?messageID=213571