|
Novell exteNd Web Services SDK API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.sssw.jbroker.web.servlet.JMSRouter
A servlet that routes incoming SOAP messages to a JMS destination wrapped
in a TextMessage. The servlet is configured using several properties
that describe how the various JMS artifacts such as connection factories and
destination should be located. For example:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<context-param>
<param-name>jms.queue.factory.jndi</param-name>
<param-value>queue/connectionFactory</param-value>
<description>
The JNDI lookup name for the queue connection factory.
</description>
</context-param>
<context-param>
<param-name>jms.queue.jndi</param-name>
<param-value>queue/queue0</param-value>
<description>
The JNDI lookup name for the queue.
</description>
</context-param>
<servlet>
<servlet-name>JMSRouter</servlet-name>
<servlet-class>com.sssw.jbroker.web.servlet.JMSRouter</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>JMSRouter</servlet-name>
<url-pattern>/jms/queue0</url-pattern>
</servlet-mapping>
</web-app>
Note that all properties specified to the servlet will be used when creating
the initial context used to lookup JMS object:
Properties props = new Properties();
ServletContext context = config.getServletContext();
Enumeration e = context.getInitParameterNames();
while (e.hasMoreElements()) {
String name = (String) e.nextElement();
props.put(name, context.getInitParameter(name));
}
InitialContext ctx = new InitialContext(props);
If the JMS_USE_REQUESTOR property is set to TRUE, the servlet will
await a response message and return it from the doPost method as a
SOAP message.
If a replyTo destination is specified and its type is different from the regular
destination, then both a queue and a topic connection factory must be specified.
If the JMS_USE_CORRELATION_ID property is specified, the ultimate
message consumer must transfer the correlation id from the request message to the
response message.
Stub.USERNAME,
Stub.PASSWORD,
Stub.JMS_TOPIC_JNDI,
Stub.JMS_QUEUE_JNDI,
Stub.JMS_TOPIC_REPLY_JNDI,
Stub.JMS_QUEUE_REPLY_JNDI,
Stub.JMS_TOPIC_FACTORY_JNDI,
Stub.JMS_QUEUE_FACTORY_JNDI,
Stub.JMS_REPLY_TIMEOUT,
Stub.JMS_REPLY_SELECTOR,
Stub.JMS_USE_REQUESTOR,
Stub.JMS_USE_CORRELATION_ID,
Serialized Form| Constructor Summary | |
JMSRouter()
|
|
| Method Summary | |
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
Process an HTTP GET command. |
void |
doPost(HttpServletRequest request,
HttpServletResponse response)
Process an HTTP POST command. |
void |
init(ServletConfig config)
Initialization of the JMS router servlet. |
| Methods inherited from class javax.servlet.http.HttpServlet |
service |
| Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public JMSRouter()
| Method Detail |
public void init(ServletConfig config)
throws ServletException
config - the ServletConfig object
ServletException - if configuration is insufficient or erronous
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException,
ServletException
request - the HttpServletRequest objectresponse - the HttpServletResponse object
IOException - if an I/O exception occurred
ServletException - if a general servlet exception occurred
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws IOException,
ServletException
request - the HttpServletRequest objectresponse - the HttpServletResponse object
IOException - if an I/O exception occurred
ServletException - if a general servlet exception occurred
|
Novell exteNd Web Services SDK API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||