The Programmer's guide that ships with 4.4 has the following example (pages 17-18) as a simple service:
<?xml version = "1.0" encoding = "UTF-8"?> <jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd"> <services> <service category="Retail" name="ShoeStore" description="Acme Shoe Store Service"> <actions> <action name="println" class="org.jboss.soa.esb.actions.SystemPrintln" /> </actions> </service> </services> </jbossesb>
It then goes on to say in the accompanying text:
No listeners are configured on the Service in the above example. This is perfectly valid. Every Service is, by default, configured with an "InVM"listener, so the ServiceInvoker will always have access to InVM addresses for locally deployed Services (i.e. in the same VM).
Does this still apply? When I try to deploy a test.esb file with this example I get (from JBossAS-4.2.3 with JBossESB-4.4 installed):
13:00:28,944 INFO [JBoss4ESBDeployer] create esb service, esbTest.esb 13:00:28,976 WARN [ServiceController] Problem starting service jboss.esb:deployment=esbTest.esb java.lang.RuntimeException: org.jboss.soa.esb.ConfigurationException: Service configuration for Service 'Retail:ShoeStore' doesn't define a Message-Aware Listener (i.e. is-gateway='false'). at org.jboss.soa.esb.listeners.config.Configuration.create(Configuration.java:132) ...
Perhaps the guide is a little out of date? I'm just trying to get things straight while learning the ESB... Does this "super-efficient" InVM listener still exist? Has the configuration format changed?
Also, if the above did indeed work, can _any_ deployment in the application server access the service via InVM? In other words, if I create a totally unrelated ejb-jar and have a stateless session bean try the client-side code for the service (as follows), will it work?
ServiceInvoker invoker = new ServiceInvoker("Retail", "ShoeStore"); Message message = MessageFactory.getInstance().getMessage(); message.getBody().add("Hi there!"); invoker.deliverAsync(message);
I can't test this scenario because I'm stuck with the deployment error mentioned previously...