I was seacher in forum, but i dont have sucess. I deploy my EJB, with web application i can to use theses ejb without problems, but when i try acess with desktop application i get the message myCustomerBean not bound.
Look my files: meta-inf/jboss-client.xml <jboss-client> | <jndi-name>myCustomerBean</jndi-name> | <ejb-ref> | <ejb-ref-name>CustomerBean</ejb-ref-name> | <jndi-name>myCustomerBean</jndi-name> | </ejb-ref> | </jboss-client> jndi.properties ava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory | java.naming.provider.url=jnp://localhost:1099 | java.naming.factory.url.pkgs=org.jboss.naming.client | j2ee.clientName=myCustomerBean My App Test: public class TestEJB { | public static void main(String[] args) { | try { | FileInputStream file = new FileInputStream("jndi.properties"); | Properties prop = new Properties(); | prop.load(file); | Context c = new InitialContext(prop); | Object homeObject = c.lookup("myCustomerBean"); | } | catch (Exception e) { | e.printStackTrace(); | } | } | } Theses files are in meta-inf the myapp.ear ejb-jar.xml <?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 | xmlns="http://java.sun.com/xml/ns/j2ee" | version="2.1" | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd" | > | <display-name xml:lang="pt">JForms Samples EJB</display-name> | | <enterprise-beans> | | <!-- Customer --> | | <entity> | <ejb-name>CustomerBean</ejb-name> | <home>org.jforms.samples.ejb.CustomerHome</home> | <remote>org.jforms.samples.ejb.Customer</remote> | <ejb-class>org.jforms.samples.ejb.CustomerBean</ejb-class> | <persistence-type>Bean</persistence-type> | <prim-key-class>java.lang.String</prim-key-class> | <reentrant>false</reentrant> | </entity> | </enterprise-beans> | </assembly-descriptor> | </ejb-jar> jboss.xml <enterprise-beans> | <ejb-name>CustomerBean</ejb-name> | <local-jndi-name>myCustomerBean</local-jndi-name> | </enterprise-beans> But, when i perform, i get: javax.naming.NameNotFoundException: myCustomerBean not bound Thanks for any help. View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3862681#3862681 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3862681 ------------------------------------------------------- The SF.Net email is sponsored by: Beat the post-holiday blues Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek. It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt _______________________________________________ JBoss-user mailing list JBoss-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jboss-user