Deployment problems
gualberto Mar 24, 2003 5:00 PM
Hi,
I´m trying to deploy an .EAR file in JBoss but it´s not working weel. The problem is that the server allways
bind the EJB with its name ( <ejb-name>NameOfIt</ejb-name>) instead of its <jndi-name>ItsJNDIName</jndi-name>
I already checked all .XMLs and it seems ok, but if i
lookup the Bean by the jndi name it does not work, but it does with the ejb-name.
That´s the context instance code:
----
Properties props = new Properties();
props.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
props.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
props.put("java.naming.provider.url", "localhost:1099");
InitialContext ctx = new InitialContext( props );
Object objref = ctx.lookup("ejb/cgccpfvalidator");
------
Following the jboss.xml and ejb-jar.xml :
---jboss.xml-----------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE jboss PUBLIC '-//JBoss//DTD JBOSS 3.0//EN' 'http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd'>
<enterprise-beans>
<ejb-name>CgcCpfValidatorBean</ejb-name>
<jndi-name>ejb/cgccpfvalidator</jndi-name>
</enterprise-beans>
--------------------------------------
-------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>
<display-name>cgcCpfJar</display-name>
<enterprise-beans>
<display-name>CgcCpfValidatorBean</display-name>
<ejb-name>CgcCpfValidatorBean</ejb-name>
beanutils.CgcCpfValidatorHome
beanutils.CgcCpfValidator
<ejb-class>beanutils.CgcCpfValidatorBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<security-identity>
<use-caller-identity></use-caller-identity>
</security-identity>
</enterprise-beans>
<assembly-descriptor>
<method-permission>
<ejb-name>CgcCpfValidatorBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getHandle</method-name>
<method-params />
<ejb-name>CgcCpfValidatorBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>getHomeHandle</method-name>
<method-params />
<ejb-name>CgcCpfValidatorBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>javax.ejb.Handle</method-param>
</method-params>
<ejb-name>CgcCpfValidatorBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>create</method-name>
<method-params />
<ejb-name>CgcCpfValidatorBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getEJBHome</method-name>
<method-params />
<ejb-name>CgcCpfValidatorBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>isIdentical</method-name>
<method-params>
<method-param>javax.ejb.EJBObject</method-param>
</method-params>
<ejb-name>CgcCpfValidatorBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>getEJBMetaData</method-name>
<method-params />
<ejb-name>CgcCpfValidatorBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>remove</method-name>
<method-params />
<ejb-name>CgcCpfValidatorBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getPrimaryKey</method-name>
<method-params />
<ejb-name>CgcCpfValidatorBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>validate</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<ejb-name>CgcCpfValidatorBean</ejb-name>
<method-intf>Home</method-intf>
<method-name>remove</method-name>
<method-params>
<method-param>java.lang.Object</method-param>
</method-params>
</method-permission>
<container-transaction>
<ejb-name>CgcCpfValidatorBean</ejb-name>
<method-intf>Remote</method-intf>
<method-name>validate</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
--------------------
thanks is advance.