migrating ejb clients from eap 5 to wildfly.
rossog Mar 27, 2014 7:31 AMSome time ago I asked more or less the same question wrt EAP6 (JBoss 7). The environment of the company I work for has stateless EJB deployed on EAP5, and we're starting to move to new technologies, starting from frontend environments. The migration should go through a first step, where spring/velocity environments would be migrate to newer versions of software and application servers (Spring 3.0->3.2, EAP5 -> Wildfly/EAP7).
My question is simple: is it possible to call stateless ejb, using spring abstraction, from wildfly to EAP5?
I went through all manual, on how to migrate spring applications and jndi ejb3 calls. I took a bit to gather all spring dependencies and create module, but in the end the spring/velocity webapp gets deployed. The problem is that I could not make an ejb invocation:
11:32:28,310 ERROR [util.ServiceListHelper] (default task-2) LISTA SERVIZI VUOTA, IMPOSSIBILE PROSEGUIRE: org.springframework.remoting.RemoteProxyFailureException: No matching RMI stub method found for: public abstract commons.model.LayerValueObject ejb.service.ServiceGenericEJB.getDataFromJndiService(commons.model.ParamValueObject); nested exception is java.lang.NoSuchMethodException: org.jboss.ejb.client.naming.ejb.EjbNamingContext.getDataFromJndiService(commons.model.ParamValueObject)
getDataFromJndiService(commons.model.ParamValueObject) is a method of ejb.service.ServiceGenericEJB, which gets diclared in an xml:
<bean id="serviceGenericEjb" lazy-init="true" class="commons.util.EjbFactoryBean" >
<property name="jndiName" value="ejb:jndirvinterface/jndirvinterface-ejb!serviceGenericEjb"/>
<property name="businessInterface" value="ejb.service.ServiceGenericEJB"/>
<property name="jndiTemplate"><ref bean="remoteJndi"/></property>
<property name="refreshHomeOnConnectFailure" value="true" />
</bean>
and its jndi template is:
<bean id="remoteJndi" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">org.jboss.naming.remote.client.InitialContextFactory</prop>
<prop key="java.naming.factory.url.pkgs">org.jboss.ejb.client.naming</prop>
<prop key="java.naming.provider.url">${jndi.ha}</prop>
<prop key="lookupHomeOnStartup">false</prop>
</props>
</property>
</bean>
Am I missing something?
Thank you very much.