Session EJB with Local Interface Problem.
manderson Mar 22, 2005 1:14 AMI just can not get this going, I get this error on deploy.
The methods defined in the local interface must have a matching method in the bean's class with the same name and same number and types of arguments.
jboss.xml
<enterprise-beans>
<ejb-name>LicenseAPIBean</ejb-name>
<jndi-name>LicenseAPI</jndi-name>
<local-jndi-name>LocalLicenseAPI</local-jndi-name>
</enterprise-beans>
ejb-jar.xml (snippet)
<![CDATA[]]>
<ejb-name>LicenseAPIBean</ejb-name>
<local-home>com.websidestory.services.licenseapi.LocalLicenseAPIHome</local-home>
com.websidestory.services.licenseapi.LocalLicenseAPI
<ejb-class>com.websidestory.services.licenseapi.LicenseAPIBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<security-role-ref>
<role-name>licenseapi</role-name>
<role-link>licenseapi</role-link>
</security-role-ref>
LocalLicenseAPI
package com.websidestory.services.licenseapi;
public interface LocalLicenseAPI
extends javax.ejb.EJBLocalObject
{
public com.websidestory.services.licenseapi.EchoResponse echo( com.websidestory.services.licenseapi.Echo message ) throws com.we
bsidestory.services.licenseapi.InternalErrorFault, com.websidestory.services.licenseapi.AuthenticationFault;
}
LocalLicenseAPIHome
package com.websidestory.services.licenseapi;
/**
* Local home interface for LicenseAPIBean.
*/
public interface LocalLicenseAPIHome
extends javax.ejb.EJBLocalHome
{
public static final String COMP_NAME="java:comp/env/ejb/LicenseAPIBeanLocal";
public static final String JNDI_NAME="LicenseAPIBeanLocal";
public com.websidestory.services.licenseapi.LocalLicenseAPI create()
throws javax.ejb.CreateException;
}
LicenseAPIBean (snippet)
package com.websidestory.services.licenseapi;
import javax.ejb.*;
import java.util.*;
import java.io.*;
import java.security.*;
/**
* @ejb.bean name="LicenseAPIBean" view-type="local" jndi-name="LicenseAPI"
* @ejb.home
* local-class="com.websidestory.services.licenseapi.LocalLicenseAPIHome"
* @ejb.interface
* service-endpoint-class="com.websidestory.services.licenseapi.LicenseAPISoap"
* local-class="com.websidestory.services.licenseapi.LocalLicenseAPI"
* @ejb.security-role-ref role-name="licenseapi" role-link="licenseapi"
* @wsee.port-component name="LicenseAPISoap" local-part="LicenseAPI"
* display-name="LicenseAPI"
* description="Session Bean exposed as a webservice"
*/
public class LicenseAPIBean implements SessionBean
{
...
/**
* @ejb.interface-method view-type="local"
**/
public EchoResponse echo(Echo message) throws InternalErrorFault, AuthenticationFault
{
System.out.println("LicenseAPI/echo invoked");
Map params = getStandardParams();
EchoHandler handler = new EchoHandler();
handler.init(params);
logUsage("echo", (String)params.get("API_KEY"), (String)params.get("ACCOUNT"));
return handler.handleRequest(message);
}
The signatures match, am I misconfigured in my deployment?