You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org> on 2008/12/23 18:48:46 UTC

[jira] Created: (SYNAPSE-493) Synapse sets the HttpCoreRequestResponseTransport status value to INITIAL

Synapse sets the HttpCoreRequestResponseTransport status value to INITIAL
-------------------------------------------------------------------------

                 Key: SYNAPSE-493
                 URL: https://issues.apache.org/jira/browse/SYNAPSE-493
             Project: Synapse
          Issue Type: Bug
            Reporter: Amila Chinthaka Suriarachchi


ServletRequestResponseTransport and SimpleHTTPRequestResponseTranspor set this value to WAITING.

This gives a problem with sandesah2. Sandesha2 has this code.

if((toEPR==null || toEPR.hasAnonymousAddress()) &&
			   (makeConnection == null || !makeConnection.booleanValue()) &&
			   (t == null || !t.getStatus().equals(RequestResponseTransportStatus.WAITING))) {
				
				// Mark this sender bean so that we know that the transport is unavailable, if the
				// bean is still stored.
				SenderBean bean = senderBeanMgr.retrieve(senderBean.getMessageID());
				if(bean != null && bean.isTransportAvailable()) {
					bean.setTransportAvailable(false);
					senderBeanMgr.update(bean);
				}
				
				// Commit the update
				if(transaction != null && transaction.isActive()) transaction.commit();
				transaction = null;
				
				if (log.isDebugEnabled())
					log.debug("Exit: SenderWorker::run, no response transport for anonymous message");
				return;
			}

it does not send the response back if the status of the RequestResponseTransport is WAITING. 

Setting this initial value to WAITING makes the Sandesha2 works with the synapse.

is it possible to change this initial value to WAITING?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-493) Synapse sets the HttpCoreRequestResponseTransport status value to INITIAL

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659189#action_12659189 ] 

Amila Chinthaka Suriarachchi commented on SYNAPSE-493:
------------------------------------------------------

I went through the doc and found this,

/**
     * Pause execution and wait for a response message to be ready.  This will
     * typically be called by the transport after a message has been paused and
     * will cause the transport to block until a response message is ready to be
     * returned.  This is required to enable RM for in-out MEPs over a
     * request/response transport; without it the message would be paused and the
     * transport would simply ack the request.
     *
     * @throws InterruptedException
     */
    public void awaitResponse() throws InterruptedException, AxisFault;

This means the transport has to set the it to wait state if AxisEngine returns a SUSPEND. But for Annonymous case the response message is send using the same thread and it returns only after response message is sent.

Seems like a problem with sandesha2 and I'll send a note there.

> Synapse sets the HttpCoreRequestResponseTransport status value to INITIAL
> -------------------------------------------------------------------------
>
>                 Key: SYNAPSE-493
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-493
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Amila Chinthaka Suriarachchi
>         Attachments: patch.txt
>
>
> ServletRequestResponseTransport and SimpleHTTPRequestResponseTranspor set this value to WAITING.
> This gives a problem with sandesah2. Sandesha2 has this code.
> if((toEPR==null || toEPR.hasAnonymousAddress()) &&
> 			   (makeConnection == null || !makeConnection.booleanValue()) &&
> 			   (t == null || !t.getStatus().equals(RequestResponseTransportStatus.WAITING))) {
> 				
> 				// Mark this sender bean so that we know that the transport is unavailable, if the
> 				// bean is still stored.
> 				SenderBean bean = senderBeanMgr.retrieve(senderBean.getMessageID());
> 				if(bean != null && bean.isTransportAvailable()) {
> 					bean.setTransportAvailable(false);
> 					senderBeanMgr.update(bean);
> 				}
> 				
> 				// Commit the update
> 				if(transaction != null && transaction.isActive()) transaction.commit();
> 				transaction = null;
> 				
> 				if (log.isDebugEnabled())
> 					log.debug("Exit: SenderWorker::run, no response transport for anonymous message");
> 				return;
> 			}
> it does not send the response back if the status of the RequestResponseTransport is WAITING. 
> Setting this initial value to WAITING makes the Sandesha2 works with the synapse.
> is it possible to change this initial value to WAITING?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Assigned: (SYNAPSE-493) Synapse sets the HttpCoreRequestResponseTransport status value to INITIAL

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ruwan Linton reassigned SYNAPSE-493:
------------------------------------

    Assignee: Ruwan Linton

> Synapse sets the HttpCoreRequestResponseTransport status value to INITIAL
> -------------------------------------------------------------------------
>
>                 Key: SYNAPSE-493
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-493
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Amila Chinthaka Suriarachchi
>            Assignee: Ruwan Linton
>         Attachments: patch.txt
>
>
> ServletRequestResponseTransport and SimpleHTTPRequestResponseTranspor set this value to WAITING.
> This gives a problem with sandesah2. Sandesha2 has this code.
> if((toEPR==null || toEPR.hasAnonymousAddress()) &&
> 			   (makeConnection == null || !makeConnection.booleanValue()) &&
> 			   (t == null || !t.getStatus().equals(RequestResponseTransportStatus.WAITING))) {
> 				
> 				// Mark this sender bean so that we know that the transport is unavailable, if the
> 				// bean is still stored.
> 				SenderBean bean = senderBeanMgr.retrieve(senderBean.getMessageID());
> 				if(bean != null && bean.isTransportAvailable()) {
> 					bean.setTransportAvailable(false);
> 					senderBeanMgr.update(bean);
> 				}
> 				
> 				// Commit the update
> 				if(transaction != null && transaction.isActive()) transaction.commit();
> 				transaction = null;
> 				
> 				if (log.isDebugEnabled())
> 					log.debug("Exit: SenderWorker::run, no response transport for anonymous message");
> 				return;
> 			}
> it does not send the response back if the status of the RequestResponseTransport is WAITING. 
> Setting this initial value to WAITING makes the Sandesha2 works with the synapse.
> is it possible to change this initial value to WAITING?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Updated: (SYNAPSE-493) Synapse sets the HttpCoreRequestResponseTransport status value to INITIAL

Posted by "Amila Chinthaka Suriarachchi (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SYNAPSE-493?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Amila Chinthaka Suriarachchi updated SYNAPSE-493:
-------------------------------------------------

    Attachment: patch.txt

proposed patch

> Synapse sets the HttpCoreRequestResponseTransport status value to INITIAL
> -------------------------------------------------------------------------
>
>                 Key: SYNAPSE-493
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-493
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Amila Chinthaka Suriarachchi
>         Attachments: patch.txt
>
>
> ServletRequestResponseTransport and SimpleHTTPRequestResponseTranspor set this value to WAITING.
> This gives a problem with sandesah2. Sandesha2 has this code.
> if((toEPR==null || toEPR.hasAnonymousAddress()) &&
> 			   (makeConnection == null || !makeConnection.booleanValue()) &&
> 			   (t == null || !t.getStatus().equals(RequestResponseTransportStatus.WAITING))) {
> 				
> 				// Mark this sender bean so that we know that the transport is unavailable, if the
> 				// bean is still stored.
> 				SenderBean bean = senderBeanMgr.retrieve(senderBean.getMessageID());
> 				if(bean != null && bean.isTransportAvailable()) {
> 					bean.setTransportAvailable(false);
> 					senderBeanMgr.update(bean);
> 				}
> 				
> 				// Commit the update
> 				if(transaction != null && transaction.isActive()) transaction.commit();
> 				transaction = null;
> 				
> 				if (log.isDebugEnabled())
> 					log.debug("Exit: SenderWorker::run, no response transport for anonymous message");
> 				return;
> 			}
> it does not send the response back if the status of the RequestResponseTransport is WAITING. 
> Setting this initial value to WAITING makes the Sandesha2 works with the synapse.
> is it possible to change this initial value to WAITING?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-493) Synapse sets the HttpCoreRequestResponseTransport status value to INITIAL

Posted by "Ruwan Linton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678740#action_12678740 ] 

Ruwan Linton commented on SYNAPSE-493:
--------------------------------------

I have modified the code as per in this patch as a workaround to get Sandesha2 working with synapse nhttp. Will be fixing this properly once this is fixed on Sandesha2.

> Synapse sets the HttpCoreRequestResponseTransport status value to INITIAL
> -------------------------------------------------------------------------
>
>                 Key: SYNAPSE-493
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-493
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Amila Chinthaka Suriarachchi
>            Assignee: Ruwan Linton
>         Attachments: patch.txt
>
>
> ServletRequestResponseTransport and SimpleHTTPRequestResponseTranspor set this value to WAITING.
> This gives a problem with sandesah2. Sandesha2 has this code.
> if((toEPR==null || toEPR.hasAnonymousAddress()) &&
> 			   (makeConnection == null || !makeConnection.booleanValue()) &&
> 			   (t == null || !t.getStatus().equals(RequestResponseTransportStatus.WAITING))) {
> 				
> 				// Mark this sender bean so that we know that the transport is unavailable, if the
> 				// bean is still stored.
> 				SenderBean bean = senderBeanMgr.retrieve(senderBean.getMessageID());
> 				if(bean != null && bean.isTransportAvailable()) {
> 					bean.setTransportAvailable(false);
> 					senderBeanMgr.update(bean);
> 				}
> 				
> 				// Commit the update
> 				if(transaction != null && transaction.isActive()) transaction.commit();
> 				transaction = null;
> 				
> 				if (log.isDebugEnabled())
> 					log.debug("Exit: SenderWorker::run, no response transport for anonymous message");
> 				return;
> 			}
> it does not send the response back if the status of the RequestResponseTransport is WAITING. 
> Setting this initial value to WAITING makes the Sandesha2 works with the synapse.
> is it possible to change this initial value to WAITING?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


[jira] Commented: (SYNAPSE-493) Synapse sets the HttpCoreRequestResponseTransport status value to INITIAL

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SYNAPSE-493?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12659078#action_12659078 ] 

Andreas Veithen commented on SYNAPSE-493:
-----------------------------------------

Note that what you are saying implies that ServletRequestResponseTransport and SimpleHTTPRequestResponseTransport are not implemented according to the documentation of RequestResponseTransportStatus, but that HttpCoreRequestResponseTransport is. I think that something needs to be clarified in ServletRequestResponseTransport, SimpleHTTPRequestResponseTransport and RequestResponseTransportStatus, before modifying HttpCoreRequestResponseTransport.

> Synapse sets the HttpCoreRequestResponseTransport status value to INITIAL
> -------------------------------------------------------------------------
>
>                 Key: SYNAPSE-493
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-493
>             Project: Synapse
>          Issue Type: Bug
>            Reporter: Amila Chinthaka Suriarachchi
>         Attachments: patch.txt
>
>
> ServletRequestResponseTransport and SimpleHTTPRequestResponseTranspor set this value to WAITING.
> This gives a problem with sandesah2. Sandesha2 has this code.
> if((toEPR==null || toEPR.hasAnonymousAddress()) &&
> 			   (makeConnection == null || !makeConnection.booleanValue()) &&
> 			   (t == null || !t.getStatus().equals(RequestResponseTransportStatus.WAITING))) {
> 				
> 				// Mark this sender bean so that we know that the transport is unavailable, if the
> 				// bean is still stored.
> 				SenderBean bean = senderBeanMgr.retrieve(senderBean.getMessageID());
> 				if(bean != null && bean.isTransportAvailable()) {
> 					bean.setTransportAvailable(false);
> 					senderBeanMgr.update(bean);
> 				}
> 				
> 				// Commit the update
> 				if(transaction != null && transaction.isActive()) transaction.commit();
> 				transaction = null;
> 				
> 				if (log.isDebugEnabled())
> 					log.debug("Exit: SenderWorker::run, no response transport for anonymous message");
> 				return;
> 			}
> it does not send the response back if the status of the RequestResponseTransport is WAITING. 
> Setting this initial value to WAITING makes the Sandesha2 works with the synapse.
> is it possible to change this initial value to WAITING?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org