You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by sachin2008 <es...@gmail.com> on 2008/03/14 09:29:25 UTC

servicemix-thread pool

For my application I built 1 http and  2 JSR servcieunits.

flow :------>>>>

http------->JSR(1)--------->JSR(2)

i implemented threads-pools on JSR(2) but is not working. it is working in
single thread only.

please help on thread-pools configuration with detailed explanation.



-----
Cheers
Praveen Oruganti
"Think before you act and act on what you believe"
-- 
View this message in context: http://www.nabble.com/servicemix-thread-pool-tp16046483s12049p16046483.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: servicemix-thread pool

Posted by Guillaume Nodet <gn...@gmail.com>.
The default configuration will create a thread pool and allow
concurrent processing of JBI exchanges by the POJO deployed onto the
jsr181.  The pojo has to be thread safe, and do not have any
synchronization on the web methods, else the concurrent processing
would become serialized.
What do you mean by "implemented thread-pools" ?

On Fri, Mar 14, 2008 at 9:29 AM, sachin2008 <es...@gmail.com> wrote:
>
>  For my application I built 1 http and  2 JSR servcieunits.
>
>  flow :------>>>>
>
>  http------->JSR(1)--------->JSR(2)
>
>  i implemented threads-pools on JSR(2) but is not working. it is working in
>  single thread only.
>
>  please help on thread-pools configuration with detailed explanation.
>
>
>
>  -----
>  Cheers
>  Praveen Oruganti
>  "Think before you act and act on what you believe"
>  --
>  View this message in context: http://www.nabble.com/servicemix-thread-pool-tp16046483s12049p16046483.html
>  Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>



-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/

Re: servicemix-thread pool

Posted by sachin2008 <es...@gmail.com>.
Thanks nodet for your quick reply.

I am running my application in JBOSS. First i will explain my application
flow.

1.In my application i am hving an input file with date and the record
creation time with space delimited.
2.JSR(1) component will read the input file upto change in the date and form
a string with date and record creation time into one group and send this
string to JSR(2) for further processing. for this i mplemented JSR(2) in
thread-pools. But it is not at all working. my application in single
threaded. 

how can i mplement thread-pools for JSR(2) component? 

Please look into my xbean.xml and guide me on configuration.

In JBOSS where should i want to configure thread-pools.?

My Xbean configuration:

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns:jsr181="http://servicemix.apache.org/jsr181/1.0"
              xmlns:blwb="http://blwb.exp.com/getGlobalService">

  
    <jsr181:endpoint service="blwb:BatchLinkage" endpoint="endpoint"          
   	           serviceInterface="com.exp.blwb.bltwb.BatchLinkageService">
        <jsr181:pojo>
              <bean class="com.exp.blwb.bltwb.BatchLinkageServiceImpl">
                    <property name="context">
                        <ref bean="context"/>
                    </property>
                    <property name="executorThreads" ref="executorFactory"
/>
                    <property name="outputFilePath"
value="${outputFilePath}" />
                    <property name="outputFileName"
value="${outputFileName}" />
                    <property name="predate" value="${predate}" />
                    <property name="postdate" value="${postdate}" />
                    <property name="identityNullPreResponse"
value="${identityNullPreResponse}" />
                    <property name="identityNullPostResponse"
value="${identityNullPostResponse}" />
                    <property name="inputFilePath"
value="${inputFilePath}"/>
                    <property name="emptyoutputFileName"
value="${emptyoutputFileName}"/>
                    <property name="nullResponseDateFileName"
value="${nullResponseDateFileName}"/>
              </bean>
          </jsr181:pojo>
    </jsr181:endpoint> 
  
  <bean id="executorFactory"
class="org.apache.servicemix.executors.impl.ExecutorFactoryImpl">
     <property name="defaultConfig">
         <bean class="org.apache.servicemix.executors.impl.ExecutorConfig">
           <property name="corePoolSize" value="4"/>
           <property name="maximumPoolSize" value="-1"/>
           <property name="queueSize" value="0"/>
         </bean>
     </property>
     
     <property name="configs">
       <map>
         <entry key="com.exp.blwb.bltwb">
           <bean
class="org.apache.servicemix.executors.impl.ExecutorConfig">
             <property name="corePoolSize" value="32"/>
             <property name="maximumPoolSize" value="40"/>
             <property name="queueSize" value="10"/>
           </bean>
         </entry>
         <entry key="com.exp.blwb.bltwb.BatchLinkageServiceImpl">
           <bean
class="org.apache.servicemix.executors.impl.ExecutorConfig">
             <property name="corePoolSize" value="${corePoolSize}"/>
             <property name="maximumPoolSize" value="${maximumPoolSize}"/>
             <property name="queueSize" value="-1"/>
           </bean>
         </entry>
       </map>
     </property>      
   </bean>	
   
   
   <bean id="propertyPlaceholder"
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
        <property name="location">
        <bean class="org.springframework.core.io.FileSystemResource">
                <constructor-arg>
                <bean
class="org.springframework.jndi.JndiObjectFactoryBean">
                        <property name="jndiName">
                             
<value>external/config/exp-bl2wb-service/bl2wb-application.properties</value>
                        </property>
                </bean>
                </constructor-arg>
        </bean>
        </property>
   </bean>
   
</beans>



sachin2008 wrote:
> 
> For my application I built 1 http and  2 JSR servcieunits.
> 
> flow :------>>>>
> 
> http------->JSR(1)--------->JSR(2)
> 
> i implemented threads-pools on JSR(2) but is not working. it is working in
> single thread only.
> 
> please help on thread-pools configuration with detailed explanation.
> 
> 
> 


-----
Cheers
Praveen Oruganti
"Think before you act and act on what you believe"
-- 
View this message in context: http://www.nabble.com/servicemix-thread-pool-tp16046483s12049p16070082.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.