Java Reference
In-Depth Information
Configuring a Java Client with Reliable Messaging
Problem
You have a web service endpoint that declares it uses reliable messaging, and you want your
client to be able to participate.
Solution
If you're using Ant to build your project, you need to put Metro 1.3 on your classpath or unjar
its contents into your client JAR.
If you're using Maven, include the following in your client project's POM:
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>webservices-rt</artifactId>
<version>1.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.xml</groupId>
<artifactId>webservices-api</artifactId>
<version>1.3</version>
<scope>compile</scope>
</dependency>
The client of a Glassfish RM service doesn't have to do anything special otherwise. With
WS-Addressing, for example, you need to pass an AddressingFeature instance to the proxy
when you create it. There's no corresponding construct for WS-ReliableMessaging. The
policy negotiation is handled by the runtime, and messages are stored in memory.
For WebLogic, you need to do a little more. In the Administration Console, follow these gen-
eral steps:
1. Create some kind of persistent store (either JDBC or file based). WebLogic server will use
this store to track the WS-RM sequences and messages. You can create a new store, or use
an existing one if you prefer.
2. Create a JMS Server or use an existing one.
3. Create a Store-And-Forward agent or use an existing one, and set its Agent Type field to
Both to allow the agent to handle both sending and receiving of messages.
Search WWH ::




Custom Search