[Design of JBoss Web Services] - WS-RM Sender/Receiver Location Within JBossWS Stack
by thomas.diesler@jboss.com
Richard sais:
RM SENDER AND RECEIVER LOCATION WITHIN JBOSSWS STACK
RM Sender and Receiver must operate on top of the transport layer
so they are able to create and close new transport connections.
RM Sender and Receiver are RM entities which goal is to ensure
message delivery and reliability according to the specified RM policy.
The expected model of RM sender/receiver is:
* It will be a separate thread responsible for accepting/returning
messages from/to JBossWS messaging layer
* It will persist all messages going through it
* It will query messages in the RM store against specific conditions
* It will create RM tasks and put it to the RM task queue when re/send is necessary
Picture of the client side follows (RM RECEIVER is similar):
|
| +-----------------------------------------------------------------------------------+
| | RM CHANNEL |
| +---+ | |
| | | | +-----------+ +---------+ |
| | J | send(request) | | put(RM request) | | |
| | B |------------------->| |------------------->| RM | |
| | O | | | RM SENDER | | TASKS | |
| | S | return response | | return RM response | QUEUE | |
| | S |<-------------------| |<---------+ | | |
| | W | | +-----------+ | +---------+ |
| | S | | | A | | |
| | | | | | +----------+ | |
| | M | | | | | | |
| | E | | write(request) | query | read(request) | | |
| | S | | write(response) | | read(resposne) | | take RM task |
| | S | | | | | | |
| | A | | V | | | |
| | G | | +-----------+ +---|------|------------------------+ |
| | I | | | | | | | RM THREAD POOL | |
| | N | | | RM STORE | | | V | |
| | G | | | | | +----------+ +----------+ | |
| | | | +-----------+ | | Thread 1 | ... | Thread N | | |
| | L | | | +----------+ +----------+ | |
| | A | | | A | | |
| | Y | | +---|------|------------------------+ |
| | E | | | | |
| | R | | read(response)| | write(request) |
| | | | | | |
| +---+ | +----|------|------------------------+ |
| | | | V | | +---+
| | | | +-----------------------+ | | | |
| | | | | Output Stream |-------->| N |
| | | | +-----------------------+ | | | E |
| | | | | | | T |
| | | | REMOTING TRANSPORT | | | W |
| | | | | | | O |
| | | +---------------------+ | | | R |
| | | | Input Stream |<-----------------| K |
| | | +---------------------+ | | | |
| | | | | +---+
| | +------------------------------------+ |
| | |
| +-----------------------------------------------------------------------------------+
|
|
Definitions:
NETWORK - Intranet or Internet network
JBOSSWS MESSAGING LAYER - JBossWS messaging layer
RM CHANNEL - is responsible for message acceptance from the JBOSSWS MESSAGING LAYER.
Since this time this channel is responsible for reliable message delivery
and will comunicate with JBOSSWS MESSAGING LAYER accordingly
(i.e. ensuring message in order delivery etc ...)
RM STORE - is responsible for persistent operations. It must be able to:
* write message and its associated metadata,
* read the message and its associated metadata,
* query the messages in the store according to the specified criteria
NOTE 1: Messages and their metadata must be fully de/serializable without
dependency on the context class loader. That means all messages will be
de/serialized before putting them to the RM STORE.
NOTE 2: Messages and their metadata will be de/serialized in the same
thread that initiated the invocation because of the heavy use
of ThreadLocals in the JBossWS invocation framework. (However this
requirement could be fixed by removing the ThreadLocal dependency)
RM TASKS QUEUE - holds RM tasks identified by the RM SENDER/RECEIVER that have to
be send to the transport layer
RM THREAD POOL - holds RM threads that are responsible for doing the tasks stored
in the RM TASKS QUEUE and execute them against REMOTING TRANSPORT
NOTE:
All this is about messages acceptance from the JBossWS messaging layer and ensuring the reliable
delivery to the network and than back to the mesaging layer. It is not about the RM message
creation on the SOAP layer. SOAP headers related to the WS-RM specification will be handled
on higher level.
IMPLEMENTATION LOCATION:
I decided that the most suitable place to put RM CHANNEL to is the RemotingConnectionImpl class.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085504#4085504
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085504
18 years, 6 months
[Design of Clustering on JBoss (Clusters/JBoss)] - Re: JBAS-4717 - Problem with @JMX for clustering
by adrian@jboss.org
Thanks. I committed the change, but I'm seeing other errors in the clustering
with and without the new ServiceController based jmx lifecycle.
First I'm seeing messages like the following:
| 13:56:06,511 WARN [JChannelFactory] Flush failed at 10.11.14.86:32776 DefaultPartition-HAPartitionCache
|
Before that it hangs at the following stacktrace
| "main" prio=1 tid=0x80cbdfa0 nid=0x2847 in Object.wait() [0x804d2000..0x804d5130]
| at java.lang.Object.wait(Native Method)
| - waiting on <0xaf1e6838> (a org.jgroups.util.Promise)
| at org.jgroups.util.Promise.doWait(Promise.java:104)
| at org.jgroups.util.Promise._getResultWithTimeout(Promise.java:60)
| at org.jgroups.util.Promise.getResultWithTimeout(Promise.java:28)
| - locked <0xaf1e6838> (a org.jgroups.util.Promise)
| at org.jgroups.protocols.pbcast.FLUSH.startFlush(FLUSH.java:207)
| at org.jgroups.protocols.pbcast.FLUSH.startFlush(FLUSH.java:229)
| at org.jgroups.protocols.pbcast.FLUSH.startFlush(FLUSH.java:229)
| at org.jgroups.protocols.pbcast.FLUSH.down(FLUSH.java:263)
| at org.jgroups.stack.ProtocolStack.down(ProtocolStack.java:339)
| at org.jgroups.JChannel.downcall(JChannel.java:1240)
| at org.jgroups.JChannel.startFlush(JChannel.java:1504)
| at org.jgroups.JChannelFactory.connect(JChannelFactory.java:364)
| - locked <0xade09c70> (a org.jgroups.JChannelFactory$Entry)
|
I then see NPEs in the DEBUG logging at shutdown:
| 2007-09-18 13:58:35,888 DEBUG [org.jboss.system.ServiceController] destroying service: jboss.jgroups:service=MultiplexerChannelFactory
| 2007-09-18 13:58:35,890 DEBUG [org.jboss.system.microcontainer.StartStopLifecycleAction] Error during stop for jboss.jgroups:service=MultiplexerChannelFactory
| java.lang.NullPointerException
| at org.jgroups.jmx.JChannelFactory.stop(JChannelFactory.java:74)
| at AOPContainerProxy$17.stop(AOPContainerProxy$17.java)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
| at org.jboss.system.microcontainer.ServiceProxy.invoke(ServiceProxy.java:184)
| at $Proxy4.stop(Unknown Source)
| at org.jboss.system.microcontainer.StartStopLifecycleAction.uninstallAction(StartStopLifecycleAction.java:56)
|
I'm guessing that the start() is really failing and that it shouldn't be a WARN?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085457#4085457
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085457
18 years, 6 months
[QA of JBoss Portal] - Tomahawk with portlets
by leuwen2000
Hi
i try to use Tomahawk 1.1.3 with JBoss Portal 2.6 (AS 4.2.1), like explained in :
http://wiki.jboss.org/wiki/Wiki.jsp?page=JSFInPortletEnvironment
, i use Tomahawk bridge 0.91.
(Is it really possible to use these tools together ?)
Deployment and initialization work, and components seems to work too, but the "submit" button on my form has no effect, except reseting all the form state. (input values are replaced by initial values)
Note that i got a text: ~com.sun.faces.portlet.saveStateFieldMarker~ at the bottom of my form.
It seems that JSF lifecycle is disturbed and that theres is a problem with state saving.
Can you help me ?
thanks
Here are my setup files:
web.xml:
-----------
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<!-- tomahawk bridge imposes it -->
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<!-- MyFaces Tomahawk uses this filter to access resources like javascript script of images or CSS, ...-->
<context-param>
A very common problem in configuring MyFaces-web-applications
is that the Extensions-Filter is not configured at all
or improperly configured. This parameter will check for a properly
configured Extensions-Filter if it is needed by the web-app.
In most cases this check will work just fine, there might be cases
where an internal forward will bypass the Extensions-Filter and the check
will not work. If this is the case, you can disable the check by setting
this parameter to false.
<param-name>org.apache.myfaces.CHECK_EXTENSIONS_FILTER</param-name>
<param-value>false</param-value>
</context-param>
<filter-name>extensionsFilter</filter-name>
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>
<init-param>
Set the size limit for uploaded files.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
<param-name>uploadMaxFileSize</param-name>
<param-value>100m</param-value>
</init-param>
<init-param>
Set the threshold size - files
below this limit are stored in memory, files above
this limit are stored on disk.
Format: 10 - 10 bytes
10k - 10 KB
10m - 10 MB
1g - 1 GB
<param-name>uploadThresholdSize</param-name>
<param-value>100k</param-value>
</init-param>
<!-- extension mapping for adding , , and other resource tags to JSF-pages -->
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<!-- servlet-name must match the name of your javax.faces.webapp.FacesServlet entry -->
<servlet-name>Faces Servlet</servlet-name>
</filter-mapping>
<!-- extension mapping for serving page-independent resources (javascript, stylesheets, images, etc.) -->
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/myFacesExtensionResource/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>*.jsp</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>extensionsFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
</web-app>
portlet.xml:
---------------
<?xml version="1.0" encoding="UTF-8"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
version="1.0">
<!-- use JSF-portlet bridge (sun) -->
<!--
<portlet-name>TestPortlet</portlet-name>
<portlet-class>org.apache.portals.bridges.portletfilter.FilterPortlet</portlet-class>
<mime-type>text/html</mime-type>
<portlet-mode>VIEW</portlet-mode>
<portlet-info>
</portlet-info>
<init-param>
Portlet init view page
com.sun.faces.portlet.INIT_VIEW
/WEB-INF/jsp/test.jsp
</init-param>
<init-param>
portlet-class
com.sun.faces.portlet.FacesPortlet
</init-param>
<init-param>
portlet-filters
jp.sf.pal.facesresponse.FacesResponseFilter,jp.sf.pal.tomahawk.filter.ExtensionsPortletFilter
</init-param>
</portlet-app>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085444#4085444
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4085444
18 years, 6 months