java - Dependency Injection of EJBs in SwitchYard ServiceTask -
i have spent lot of time on finding way dependency injection of java enterprise beans in switchyard service. in general want have 2 different ears, 1 database services , 1 contains different switchyard projects.
i want inject remote service stateless enterprise bean in switchyardservicetask class, part of bpmn process. shouldn't big task switchyard there troubles that. switchyard project packaged within jar, bundled in ear deployed @ same wildfly instance other ear.
as application server use wildfly 10. deployed services work correctly cannot inject service in switchyard service task.
when deploy database services deployment section of service looks that:
2017-07-25 08:42:21,053 info [org.jboss.as.ejb3.deployment] (msc service thread 1-8) wflyejb0473: jndi bindings session bean named 'transportationorderservice' in deployment unit 'subdeployment "shipping-rest-1.0.war" of deployment "shipping-application-1.0.ear"' follows: java:global/shipping-application/shipping-rest-1.0/transportationorderservice!at.locoso.laps.shipping.transportationorder.dal.transportationorderdalmgmt.serviceapi.transportationorderservicelocal java:app/shipping-rest-1.0/transportationorderservice!at.locoso.laps.shipping.transportationorder.dal.transportationorderdalmgmt.serviceapi.transportationorderservicelocal java:module/transportationorderservice!at.locoso.laps.shipping.transportationorder.dal.transportationorderdalmgmt.serviceapi.transportationorderservicelocal java:global/shipping-application/shipping-rest-1.0/transportationorderservice!at.locoso.laps.shipping.transportationorder.dal.transportationorderdalmgmt.serviceapi.transportationorderserviceremote java:app/shipping-rest-1.0/transportationorderservice!at.locoso.laps.shipping.transportationorder.dal.transportationorderdalmgmt.serviceapi.transportationorderserviceremote java:module/transportationorderservice!at.locoso.laps.shipping.transportationorder.dal.transportationorderdalmgmt.serviceapi.transportationorderserviceremote java:jboss/exported/shipping-application/shipping-rest-1.0/transportationorderservice!at.locoso.laps.shipping.transportationorder.dal.transportationorderdalmgmt.serviceapi.transportationorderserviceremote
my switchyard servicetask looks that:
@service(readtransportationorder.class) public class readtransportationorderbean implements readtransportationorder { @ejb(mappedname = "java:global/shipping-application/shipping-rest-1.0/transportationorderservice") private transportationorderserviceremote transportationorderservice; public void somemethod(someparameter parameter) {..} }
if try deploy switchyardservice bundled in ear following exception:
2017-07-25 09:20:56,129 error [org.jboss.msc.service.fail] (msc service thread 1-4) msc000001: failed start service jboss.deployment.subunit."shipping-if-application-1.0.ear"."exptransportationorderprocess-1.0.jar".switchyardservice: org.jboss.msc.service.startexception in service jboss.deployment.subunit."shipping-if-application-1.0.ear"."exptransportationorderprocess-1.0.jar".switchyardservice: org.switchyard.switchyardexception: switchyard030412: unknown service name '{urn:at.locoso.laps.shipping.exchange:exptransportationorderprocess:1.0}readtransportationorder'. @ org.switchyard.as7.extension.services.switchyardservice.start(switchyardservice.java:84) @ org.jboss.msc.service.servicecontrollerimpl$starttask.startservice(servicecontrollerimpl.java:1948) @ org.jboss.msc.service.servicecontrollerimpl$starttask.run(servicecontrollerimpl.java:1881) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617) @ java.lang.thread.run(thread.java:745) caused by: org.switchyard.switchyardexception: switchyard030412: unknown service name '{urn:at.locoso.laps.shipping.exchange:exptransportationorderprocess:1.0}readtransportationorder'. @ org.switchyard.component.bean.deploy.beancomponentactivator.activateservice(beancomponentactivator.java:90) @ org.switchyard.deploy.internal.deployment.deployimplementations(deployment.java:554) @ org.switchyard.deploy.internal.deployment.start(deployment.java:144) @ org.switchyard.as7.extension.deployment.switchyarddeployment.start(switchyarddeployment.java:158) @ org.switchyard.as7.extension.services.switchyardservice.start(switchyardservice.java:77) ... 5 more
if remove property ejb annotation service deployed correctly in opinion problem ejb reference. have tried lot of things basic thing work, it's bit frustrating.. have experience in dependency injection of java enterprise beans in switchyard services , can me?
Comments
Post a Comment