-
1. Re: comp not boud
haraldgliebe Jul 4, 2003 4:38 PM (in response to cjboss)JBoss, currently doesn't have a client container, so you can't use the java:comp/env namespace from an application client. Use the jndi-name of the EJBs directly.
Regards,
Harald -
2. Re: comp not boud
cjboss Jul 4, 2003 6:01 PM (in response to cjboss)JBoss, currently doesn't have a client container, so you can't use the java:comp/env namespace from an application client. Use the jndi-name of the EJBs directly.
can use the java:comp/env/ejb/persona to EntityBean and java:comp/env/ejb/coorporacion to SessionBean -
3. Re: comp not boud
cjboss Jul 4, 2003 6:32 PM (in response to cjboss)I change for jndi and obtain the next error
javax.naming.NameNotFoundException
MiCoorporacion not bound
any can help me. -
4. Re: comp not boud
darranl Jul 4, 2003 6:36 PM (in response to cjboss)Looks like the name you are looking up is not the same as the name that the bean is bound under.
Can you post your jboss.xml and the code you are using to lookup the bean. -
5. Re: comp not boud
cjboss Jul 4, 2003 6:50 PM (in response to cjboss)My file jboss.xml
<?xml version="1.0"?>
<enterprise-beans>
<ejb-name>PersonaEJB</ejb-name>
<jndi-name>MiPersona</jndi-name>
<ejb-name>CoorporacionEJB</ejb-name>
<jndi-name>MiCoorporacion</jndi-name>
<ejb-ref>
<ejb-ref-name>ejb/persona</ejb-ref-name>
<jndi-name>MiPersona</jndi-name>
</ejb-ref>
</enterprise-beans> -
6. Re: comp not boud
cjboss Jul 4, 2003 8:10 PM (in response to cjboss)My code in resumen:
public class EJBLocalizador
{
public static final String CMP_NEGOCIO_PERSONA = "MiCoorporacion";
public static CoorporacionHome gIObtenerCoorporacionHome()
throws NamingException {
Context loInicial = new InitialContext();
Object loReferencia = loInicial.lookup(CMP_NEGOCIO_PERSONA);
return (CoorporacionHome)
PortableRemoteObject.narrow(loReferencia, CoorporacionHome.class);
}
}
public class HerenciaClienteCMP
{
public static void main(String[] args) {
CoorporacionHome lICoorporacionHome;
Coorporacion lICoorporacion;
try {
lICoorporacionHome = EJBLocalizador.gIObtenerCoorporacionHome();
lICoorporacion = lICoorporacionHome.create();
System.exit(0);
}
catch (NamingException e) {
System.out.println("Namig: " + e.getMessage());
e.printStackTrace();
}
catch (Exception e) {
System.out.println("Error: " + e.getMessage());
}
}
} -
7. Re: comp not boud
adrian.brock Jul 6, 2003 6:44 AM (in response to cjboss)Goto http://localhost:8080/jmx-console
click on JNDIView and then click list.
You should see what its bound into global jndi at the bottom.
Is your ejb there with the name you expect?
Regards,
Adrian -
8. Re: comp not boud
cjboss Jul 7, 2003 5:01 PM (in response to cjboss)I do click in http://localhost:8080/jmx-console and later do click:
service=JNDIView
not exist the JNDI the my EJB
in jboss.j2ee
not exist the JNDI the my EJB -
9. Re: comp not boud
cjboss Jul 7, 2003 6:37 PM (in response to cjboss)I resolve this problem.
I work with interface local have that use
<ejb-local-ref>
<\ejb-local-ref>
in ejb-jar.xml
Thanks you for help me