[jboss-user] [Messaging, JMS & JBossMQ] - Setting up a non-server specific EAR

Juan Bustamante do-not-reply at jboss.com
Mon Oct 15 17:43:44 EDT 2007


I am currently working on a project that uses an MDB to read messages off of an MQ queue, process them, and then write the response to another queue on the same queue manager. 

The issue that we are having is that we have server specific data such as the hostname, queue name to drain from etc. within our ejb-jar.xml. This is a hastle for our build team because they require a new EAR file for each JBoss server they deploy the application on. My question is the following. Is there a way to separate the server specific data from the ejb-jar.xml?

The technologies that we use are IBM Websphere MQ Explorer with fixpack 6.0.2, JBoss AS 4.0.5.GA, java 1.5_011. 

The following is a sample EJB definition from our ejb-jar.xml.


		<message-driven>
  | 			<ejb-name>Listener1</ejb-name>
  | 			<ejb-class>qualified class name</ejb-class>
  | 			<messaging-type>javax.jms.MessageListener</messaging-type>			
  | 			<transaction-type>Container</transaction-type>			
  | 			<env-entry>
  | 				<env-entry-name>EJBName</env-entry-name>
  | 				<env-entry-type>java.lang.String</env-entry-type>
  | 				<env-entry-value>Listener1</env-entry-value>
  | 			</env-entry>
  | 			<env-entry>
  | 				<!-- The JNDI name of the connection factory used -->
  | 				<!-- to send the response. -->
  | 				<env-entry-name>connectionFactory</env-entry-name>
  | 				<env-entry-type>java.lang.String</env-entry-type>
  | 				<env-entry-value>java:WSMQueueConnectionFactory</env-entry-value>
  | 		  	</env-entry>
  | 		  	<env-entry>
  | 				<!-- The JNDI location of the queue used -->
  | 				<!-- to send the response. -->		  	
  | 				<env-entry-name>queueJndi</env-entry-name>
  | 				<env-entry-type>java.lang.String</env-entry-type>
  | 				<env-entry-value>java:queue</env-entry-value>
  | 		  	</env-entry>
  | 			<activation-config>
  |                 <activation-config-property>
  |                     <activation-config-property-name>destination</activation-config-property-name>
  |                     <activation-config-property-value>QUEUE.NAME</activation-config-property-value>
  |                 </activation-config-property>
  |                 <activation-config-property>
  |                     <activation-config-property-name>destinationType</activation-config-property-name>
  |                     <activation-config-property-value>javax.jms.Queue</activation-config-property-value>
  |                 </activation-config-property>
  |                 <activation-config-property>
  |                     <activation-config-property-name>useJNDI</activation-config-property-name>
  |                     <activation-config-property-value>false</activation-config-property-value>
  |                 </activation-config-property>                
  |                 <activation-config-property>
  |                     <activation-config-property-name>hostName</activation-config-property-name>
  |                     <activation-config-property-value>ourHost</activation-config-property-value>
  |                 </activation-config-property>                                
  |                 <activation-config-property>
  |                     <activation-config-property-name>queueManager</activation-config-property-name>
  |                     <activation-config-property-value>ourQM</activation-config-property-value>
  |                 </activation-config-property>                                                
  |                 <activation-config-property>
  |                     <activation-config-property-name>transportType</activation-config-property-name>
  |                     <activation-config-property-value>CLIENT</activation-config-property-value>
  |                 </activation-config-property>                                                
  |                 <activation-config-property>
  |                     <activation-config-property-name>port</activation-config-property-name>
  |                     <activation-config-property-value>1414</activation-config-property-value>
  |                 </activation-config-property>                                                
  | 	       </activation-config>
  | 		</message-driven>

We followed the WIKI site about how to set up JBoss with WS MQ part 4. 

Thank you very much in advance,

Juan 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4095420#4095420

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4095420



More information about the jboss-user mailing list