You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "David Liu (JIRA)" <ji...@apache.org> on 2011/04/26 11:20:03 UTC

[jira] [Created] (CXF-3473) Thread issue in CXF LocalConduit and LocalDestination

Thread issue in CXF LocalConduit and LocalDestination
-----------------------------------------------------

                 Key: CXF-3473
                 URL: https://issues.apache.org/jira/browse/CXF-3473
             Project: CXF
          Issue Type: Bug
          Components: Core
            Reporter: David Liu


  In CXF's LocalConduit and LocalDestination, it always creates a new Thread to process Request message and Response message. It will cause performance issue if we use Local transport for internal message routing.

  Can we use Executor instead of creating thread? thanks.

In LocalDestination.java:
{code}
    final Runnable receiver = new Runnable() {
        public void run() {                                    
            if (exchange != null) {
                exchange.setInMessage(m);
            }
            conduit.getMessageObserver().onMessage(m);
        }
    };
    
    new Thread(receiver).start();
{code} 

In LocalConduit:
{code}
   final Runnable receiver = new Runnable() {
       public void run() {
           ExchangeImpl ex = new ExchangeImpl();
           ex.setInMessage(inMsg);
           ex.put(IN_EXCHANGE, exchange);
           destination.getMessageObserver().onMessage(inMsg);
       }
   };

   new Thread(receiver).start();
{code} 


David


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CXF-3473) Thread issue in CXF LocalConduit and LocalDestination

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

Willem Jiang resolved CXF-3473.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 2.4.1

Applied patch into trunk, now the LocalTransport has the {get|set}Executor method.

> Thread issue in CXF LocalConduit and LocalDestination
> -----------------------------------------------------
>
>                 Key: CXF-3473
>                 URL: https://issues.apache.org/jira/browse/CXF-3473
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>            Assignee: Willem Jiang
>             Fix For: 2.4.1
>
>
>   In CXF's LocalConduit and LocalDestination, it always creates a new Thread to process Request message and Response message. It will cause performance issue if we use Local transport for internal message routing.
>   Can we use Executor instead of creating thread? thanks.
> In LocalDestination.java:
> {code}
>     final Runnable receiver = new Runnable() {
>         public void run() {                                    
>             if (exchange != null) {
>                 exchange.setInMessage(m);
>             }
>             conduit.getMessageObserver().onMessage(m);
>         }
>     };
>     
>     new Thread(receiver).start();
> {code} 
> In LocalConduit:
> {code}
>    final Runnable receiver = new Runnable() {
>        public void run() {
>            ExchangeImpl ex = new ExchangeImpl();
>            ex.setInMessage(inMsg);
>            ex.put(IN_EXCHANGE, exchange);
>            destination.getMessageObserver().onMessage(inMsg);
>        }
>    };
>    new Thread(receiver).start();
> {code} 
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CXF-3473) Thread issue in CXF LocalConduit and LocalDestination

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

David Liu updated CXF-3473:
---------------------------

    Affects Version/s: 2.2

> Thread issue in CXF LocalConduit and LocalDestination
> -----------------------------------------------------
>
>                 Key: CXF-3473
>                 URL: https://issues.apache.org/jira/browse/CXF-3473
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2
>            Reporter: David Liu
>
>   In CXF's LocalConduit and LocalDestination, it always creates a new Thread to process Request message and Response message. It will cause performance issue if we use Local transport for internal message routing.
>   Can we use Executor instead of creating thread? thanks.
> In LocalDestination.java:
> {code}
>     final Runnable receiver = new Runnable() {
>         public void run() {                                    
>             if (exchange != null) {
>                 exchange.setInMessage(m);
>             }
>             conduit.getMessageObserver().onMessage(m);
>         }
>     };
>     
>     new Thread(receiver).start();
> {code} 
> In LocalConduit:
> {code}
>    final Runnable receiver = new Runnable() {
>        public void run() {
>            ExchangeImpl ex = new ExchangeImpl();
>            ex.setInMessage(inMsg);
>            ex.put(IN_EXCHANGE, exchange);
>            destination.getMessageObserver().onMessage(inMsg);
>        }
>    };
>    new Thread(receiver).start();
> {code} 
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CXF-3473) Thread issue in CXF LocalConduit and LocalDestination

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

David Liu updated CXF-3473:
---------------------------

    Affects Version/s: 2.4

I just checked 2.4, the issue is there.

> Thread issue in CXF LocalConduit and LocalDestination
> -----------------------------------------------------
>
>                 Key: CXF-3473
>                 URL: https://issues.apache.org/jira/browse/CXF-3473
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>            Assignee: Willem Jiang
>
>   In CXF's LocalConduit and LocalDestination, it always creates a new Thread to process Request message and Response message. It will cause performance issue if we use Local transport for internal message routing.
>   Can we use Executor instead of creating thread? thanks.
> In LocalDestination.java:
> {code}
>     final Runnable receiver = new Runnable() {
>         public void run() {                                    
>             if (exchange != null) {
>                 exchange.setInMessage(m);
>             }
>             conduit.getMessageObserver().onMessage(m);
>         }
>     };
>     
>     new Thread(receiver).start();
> {code} 
> In LocalConduit:
> {code}
>    final Runnable receiver = new Runnable() {
>        public void run() {
>            ExchangeImpl ex = new ExchangeImpl();
>            ex.setInMessage(inMsg);
>            ex.put(IN_EXCHANGE, exchange);
>            destination.getMessageObserver().onMessage(inMsg);
>        }
>    };
>    new Thread(receiver).start();
> {code} 
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CXF-3473) Thread issue in CXF LocalConduit and LocalDestination

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

Willem Jiang reassigned CXF-3473:
---------------------------------

    Assignee: Willem Jiang

> Thread issue in CXF LocalConduit and LocalDestination
> -----------------------------------------------------
>
>                 Key: CXF-3473
>                 URL: https://issues.apache.org/jira/browse/CXF-3473
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2
>            Reporter: David Liu
>            Assignee: Willem Jiang
>
>   In CXF's LocalConduit and LocalDestination, it always creates a new Thread to process Request message and Response message. It will cause performance issue if we use Local transport for internal message routing.
>   Can we use Executor instead of creating thread? thanks.
> In LocalDestination.java:
> {code}
>     final Runnable receiver = new Runnable() {
>         public void run() {                                    
>             if (exchange != null) {
>                 exchange.setInMessage(m);
>             }
>             conduit.getMessageObserver().onMessage(m);
>         }
>     };
>     
>     new Thread(receiver).start();
> {code} 
> In LocalConduit:
> {code}
>    final Runnable receiver = new Runnable() {
>        public void run() {
>            ExchangeImpl ex = new ExchangeImpl();
>            ex.setInMessage(inMsg);
>            ex.put(IN_EXCHANGE, exchange);
>            destination.getMessageObserver().onMessage(inMsg);
>        }
>    };
>    new Thread(receiver).start();
> {code} 
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3473) Thread issue in CXF LocalConduit and LocalDestination

Posted by "Willem Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025588#comment-13025588 ] 

Willem Jiang commented on CXF-3473:
-----------------------------------

I think we could use the AutomaticWorkQueue to do this kind of job instead create a new thread each time.

> Thread issue in CXF LocalConduit and LocalDestination
> -----------------------------------------------------
>
>                 Key: CXF-3473
>                 URL: https://issues.apache.org/jira/browse/CXF-3473
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2
>            Reporter: David Liu
>
>   In CXF's LocalConduit and LocalDestination, it always creates a new Thread to process Request message and Response message. It will cause performance issue if we use Local transport for internal message routing.
>   Can we use Executor instead of creating thread? thanks.
> In LocalDestination.java:
> {code}
>     final Runnable receiver = new Runnable() {
>         public void run() {                                    
>             if (exchange != null) {
>                 exchange.setInMessage(m);
>             }
>             conduit.getMessageObserver().onMessage(m);
>         }
>     };
>     
>     new Thread(receiver).start();
> {code} 
> In LocalConduit:
> {code}
>    final Runnable receiver = new Runnable() {
>        public void run() {
>            ExchangeImpl ex = new ExchangeImpl();
>            ex.setInMessage(inMsg);
>            ex.put(IN_EXCHANGE, exchange);
>            destination.getMessageObserver().onMessage(inMsg);
>        }
>    };
>    new Thread(receiver).start();
> {code} 
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3473) Thread issue in CXF LocalConduit and LocalDestination

Posted by "David Liu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13025644#comment-13025644 ] 

David Liu commented on CXF-3473:
--------------------------------

Thanks Willem, I think it also would be good to allow user to config their own Excutor. e.g. have a property for get/set Executor.

David

> Thread issue in CXF LocalConduit and LocalDestination
> -----------------------------------------------------
>
>                 Key: CXF-3473
>                 URL: https://issues.apache.org/jira/browse/CXF-3473
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>            Assignee: Willem Jiang
>
>   In CXF's LocalConduit and LocalDestination, it always creates a new Thread to process Request message and Response message. It will cause performance issue if we use Local transport for internal message routing.
>   Can we use Executor instead of creating thread? thanks.
> In LocalDestination.java:
> {code}
>     final Runnable receiver = new Runnable() {
>         public void run() {                                    
>             if (exchange != null) {
>                 exchange.setInMessage(m);
>             }
>             conduit.getMessageObserver().onMessage(m);
>         }
>     };
>     
>     new Thread(receiver).start();
> {code} 
> In LocalConduit:
> {code}
>    final Runnable receiver = new Runnable() {
>        public void run() {
>            ExchangeImpl ex = new ExchangeImpl();
>            ex.setInMessage(inMsg);
>            ex.put(IN_EXCHANGE, exchange);
>            destination.getMessageObserver().onMessage(inMsg);
>        }
>    };
>    new Thread(receiver).start();
> {code} 
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CXF-3473) Thread issue in CXF LocalConduit and LocalDestination

Posted by "David Liu (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13029084#comment-13029084 ] 

David Liu commented on CXF-3473:
--------------------------------

Thanks Willem.

David

> Thread issue in CXF LocalConduit and LocalDestination
> -----------------------------------------------------
>
>                 Key: CXF-3473
>                 URL: https://issues.apache.org/jira/browse/CXF-3473
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.2, 2.4
>            Reporter: David Liu
>            Assignee: Willem Jiang
>             Fix For: 2.4.1
>
>
>   In CXF's LocalConduit and LocalDestination, it always creates a new Thread to process Request message and Response message. It will cause performance issue if we use Local transport for internal message routing.
>   Can we use Executor instead of creating thread? thanks.
> In LocalDestination.java:
> {code}
>     final Runnable receiver = new Runnable() {
>         public void run() {                                    
>             if (exchange != null) {
>                 exchange.setInMessage(m);
>             }
>             conduit.getMessageObserver().onMessage(m);
>         }
>     };
>     
>     new Thread(receiver).start();
> {code} 
> In LocalConduit:
> {code}
>    final Runnable receiver = new Runnable() {
>        public void run() {
>            ExchangeImpl ex = new ExchangeImpl();
>            ex.setInMessage(inMsg);
>            ex.put(IN_EXCHANGE, exchange);
>            destination.getMessageObserver().onMessage(inMsg);
>        }
>    };
>    new Thread(receiver).start();
> {code} 
> David

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira