I have a bean with the following descriptor
 
        <entity>
            <description>CustomerBean</description>
            <ejb-name>CustomerBean</ejb-name>
            <home>asd.ejb.orders.interfaces.CustomerHome</home>
            <remote>asd.ejb.orders.interfaces.Customer</remote>
            <ejb-class>asd.ejb.orders.server.CustomerBean</ejb-class>
            <persistence-type>Container</persistence-type>
            <prim-key-class>java.lang.Integer</prim-key-class>
            <reentrant>False</reentrant>
            <cmp-field><field-name>customerId</field-name></cmp-field>
            <cmp-field><field-name>firstName</field-name></cmp-field>
            <cmp-field><field-name>secondName</field-name></cmp-field>
            <cmp-field><field-name>secondName</field-name></cmp-field>
            ....
            <primkey-field>customerId</primkey-field>
        </entity>
 
having deployed the bean I try invoking the bean in the same way as in the TestBean
 

Properties prop = new Properties();
prop.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
prop.put(Context.URL_PKG_PREFIXES,"org.jnp.interfaces");
prop.put(Context.PROVIDER_URL, "127.0.0.1" );

CustomerBeanHome customerHome = (CustomerBeanHome) ctx.lookup("CustomerBean");

I get the following exception
javax.naming.NameNotFoundException: CustomerBean not bound
 at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:245)
 at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:220)
 at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:122)
 at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
 at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:280)
 at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:265)
 at javax.naming.InitialContext.lookup(InitialContext.java:350)
 
what could I be missing?

Reply via email to