com.softwareag.jca
Interface PMQMessageStreamListener
public interface PMQMessageStreamListener
Provides an interface to receive messages as message driven bean from
PMQMessageServer
. PMQMessageListener
is an other
message driven brean interface.
To configure your EJB implementation, use the following META-INF/ejb-jar.xml
as an example in
application deployment descriptor.
<ejb-jar
version="2.1"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<display-name>PMQConnectorTest</display-name>
<enterprise-beans>
<message-driven>
<ejb-name>PMQReceiverBean</ejb-name>
<ejb-class>com.mysoftcompany.test.PMQReceiverBean</ejb-class>
<messaging-type>com.softwareag.jca.PMQMessageStreamListener</messaging-type>
<transaction-type>Container</transaction-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>broker</activation-config-property-name>
<activation-config-property-value>localhost</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>service</activation-config-property-name>
<activation-config-property-value>QUEUE/XML/TEST</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>userid</activation-config-property-name>
<activation-config-property-value>jca-server</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>replicates</activation-config-property-name>
<activation-config-property-value>1</activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>PMQReceiverBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
See PMQActivationSpec
setter and getter methods for more config properties.
Depends on the web application server, the message driven bean is binding to
the connector implementation RAR file PMQConnector.rar
.
JBoss requires META-INF/jboss.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>PMQReceiverBean</ejb-name>
<destination-jndi-name>dummy</destination-jndi-name>
<resource-adapter-name>PMQConnector.rar</resource-adapter-name>
</message-driven>
</enterprise-beans>
</jboss>
- Version:
- $Revision: 1.2 $
Method Summary |
void |
onMessage(java.io.InputStream input)
The receiver receives a message as input stream. |
onMessage
void onMessage(java.io.InputStream input)
throws java.lang.Throwable
- The receiver receives a message as input stream. The delivery
process can restart if an exception is throwed.
- Parameters:
input
- Message input stream
- Throws:
java.lang.Throwable
- to restart the message delivery
Copyright © 2004-2008 Software AG. All Rights Reserved.