com.softwareag.jca
Interface RPCMessageListener
public interface RPCMessageListener
Provides an interface to receive RPC request as message driven bean from
RPCMessageServer
connector adapter.
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>RPCConnectorTest</display-name>
<enterprise-beans>
<message-driven>
<ejb-name>RPCReceiverBean</ejb-name>
<ejb-class>com.mysoftcompany.test.RPCReceiverBean</ejb-class>
<messaging-type>com.softwareag.jca.RPCMessageListener</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>RPC/XML/CALLNAT</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>RPCReceiverBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
See RPCActivationSpec
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 RPCConnector.rar
.
JBoss requires META-INF/jboss.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>RPCReceiverBean</ejb-name>
<destination-jndi-name>dummy</destination-jndi-name>
<resource-adapter-name>RPCConnector.rar</resource-adapter-name>
</message-driven>
</enterprise-beans>
</jboss>
- Version:
- $Revision: 1.1 $
onMessage
void onMessage(RPCMessage message)
throws java.lang.Throwable
- Is called for each received RPC request. The message dispatcher
- Parameters:
message
- container for RPC details
- Throws:
java.lang.Throwable
- throws exception to the client.
Copyright © 2004-2008 Software AG. All Rights Reserved.