1.
2. Compile the example MDB, TextMDB.java. The source code for this example is located in JBoss Administration and Development, Chapter 4, Example 2.
3. Create a directory named META-INF in the output directory that now contains the org.jboss.chap4.ex2.TextMDB.class.
4. Copy the files ejb-jar.xml and jboss.xml from the source directory associated with Example 2 of Chapter 4 of JBoss Administration and Development, to the META-INF directory.
5. Create the EJB jar file by changing directories to the output directory and issuing the following command:In JBoss 4.0.2, the JNDI names QueueConnectionFactory and TopicConnectionFactory do not come pre-mapped to the internal JBoss connection factory called ConnectionFactory. Therefore you must add this mapping in order to use the example MDB without modification. The mapping must be configured by adding the following lines in the file %JBOSS_DEPLOY%\jms\jbossmq-service.xml:
7. Start the JBoss server by changing to the %JBOSS_HOME%\bin directory and issuing the following command:
8. 19:35:33,343 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/jboss-4.0.2/server/default/deploy/myejb.jar19:35:34,875 INFO [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Started jboss.j2ee:binding=message-driven-bean,jndiName=local/TextMDB,plugin=invoker,service=EJB19:35:34,875 INFO [org.jboss.ejb.plugins.MessageDrivenInstancePool] Started jboss.j2ee:jndiName=local/TextMDB,plugin=pool,service=EJB19:35:34,875 INFO [org.jboss.ejb.MessageDrivenContainer] Started jboss.j2ee:jndiName=local/TextMDB,service=EJB19:35:34,875 INFO [org.jboss.ejb.EjbModule] Started jboss.j2ee:module=myejb.jar,service=EjbModule19:35:34,875 INFO [org.jboss.ejb.EJBDeployer] Deployed: file:/C:/jboss-4.0.2/server/default/deploy/myejb.jar19:35:34,968 INFO [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/jboss-4.0.2/server/default/deploy/myejb.jar
11. Compile the client program, org.jboss.chap4.ex2.SendRecvClient.java. The source to this program is listed in the book JBoss Administration and Development.
12. The %JBOSS_CLIENT% directory is included so that the file jndi.properties in that directory can be found (see the next step).
13. In JBoss 4.0.2, a jndi.properties file does not come pre-configured for the client, therefore, you will have to create one. The easiest way is to first copy jndi.properties from %JBOSS_CONF% to %JBOSS_CLIENT%. Then add the following line in the copied file:
Copyright © TIBCO Software Inc. All Rights Reserved.