Attached is an archive with 5 maven modules. There are two separate JEE
applications. This replicates the scenario of the jEnterprise2010
benchmark where the problem originated.
envEntryLookupEAR
envEntryEmulatorSampleEAR
You will need to use Maven3 to build these projects. I will provide the
order each needs to be built. Before building one of the modules the
maven pom.xml needs to be updated.
It will mean the generated ws client api is compiled with the correct
URL to the wsdl.
The sample contains two applications. The first is the application than
initiates the web service call. Called envEntryLookupEAR. The second has
the receiving StaticService web service and is called
envEntryEmulatorSampleEAR.
Call sequence,
The first contains a Servlet. You will use this when everything is
deployed. The Servlet puts a message onto a queue. An MDB is activated
when a message is put on the queue. The MDB ignores the message and
invokes the StaticService ws.
The web service is invoked. The web service creates an instance of an
object called StaticInit. Inside this object a jndi lookup is made. The
lookup name should have an Integer object bound. Which is configured as
an env-entry in the web application deployment descriptor.
envEntryEmulatorSampleWeb/src/main/webapp/WEB-INF/web.xml
1)
Change the hostname to localhost or the public interface configured for
AS7.
envEntryLookupClient/pom.xml
1.1)
Change the existing XA jms connection factory to
java:jboss/jms/JmsXA
1.2)
Add a new queue.
<jms-queue name="AcmeQueue">
<entry name="java:jboss/jms/AcmeQueue"/>
</jms-queue>
2)
Build and install the modules in this order.
envEntryEmulatorSampleWeb
envEntryEmulatorSampleEAR
3) Deploy the envEntryEmulatorSampleEAR to a running AS7.
5) Build and install the modules in this order.
envEntryLookupClient
envEntryLookupEJB
envEntryLookupWeb
envEntryLookupEAR
6) Deploy envEntryLookupEAR to AS7.
You should expect to see this in the console.
13:22:15,324 INFO [org.jboss.as.ejb3] (MSC service thread 1-5)
JBAS014142: Started message driven bean 'AcmeMDB' with 'hornetq-ra'
resource adapter
13:22:15,349 INFO [org.jboss.web] (MSC service thread 1-5) registering
web context: /envEntryLookupWeb
13:22:15,361 INFO [org.jboss.as.server] (management-handler-threads -
9) JBAS018559: Deployed "envEntryLookupEAR-0.0.1-SNAPSHOT.ear"
7)
Use a browser to make a request to the Servlet.
http://localhost:8080/envEntryLookupWeb/pushmessage
8)
The AS7 console should display an exception.
javax.naming.NameNotFoundException: java:comp/env/supplier.payloadsize.min
Regards,
Jeremy