You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Michael Bauroth <mi...@falcom.de> on 2006/11/30 16:44:12 UTC

Spring and Acceptor ...

Hi,

me again :)

I've played a little bit with different acceptor settings and want to 
try the following with Spring:

this.acceptor = new SocketAcceptor( 2, Executors.newCachedThreadPool() );

But this seems advanced Spring stuff :(
Has anybody a hint for me about the right syntax?

Thanx in advance.

Michael

Re: Spring and Acceptor ...

Posted by Michael Bauroth <Mi...@falcom.de>.
Thank you. Have found it in the meanwhile by myself. Seems that I had a 
blackout :)

Best Regards
Michael

Niklas Therning schrieb:
> Michael Bauroth wrote:
>> Hi,
>>
>> me again :)
>>
>> I've played a little bit with different acceptor settings and want to
>> try the following with Spring:
>>
>> this.acceptor = new SocketAcceptor( 2, Executors.newCachedThreadPool() );
>>
>> But this seems advanced Spring stuff :(
>> Has anybody a hint for me about the right syntax?
> Something like:
> 
> <bean id="socketAcceptor" class="o.a.m.transport.socket.nio.SocketAcceptor">
>   <constructor-arg value="2"/>
>   <constructor-arg>
>     <bean class="java.util.concurrent.Executors"
> factory-method="newCachedThreadPool"/>
>   </constructor-arg>
>   ...
> </bean>
> 
> could work.
> 
> HTH
> 


Re: Spring and Acceptor ...

Posted by Niklas Therning <ni...@trillian.se>.
Michael Bauroth wrote:
> Hi,
>
> me again :)
>
> I've played a little bit with different acceptor settings and want to
> try the following with Spring:
>
> this.acceptor = new SocketAcceptor( 2, Executors.newCachedThreadPool() );
>
> But this seems advanced Spring stuff :(
> Has anybody a hint for me about the right syntax?
Something like:

<bean id="socketAcceptor" class="o.a.m.transport.socket.nio.SocketAcceptor">
  <constructor-arg value="2"/>
  <constructor-arg>
    <bean class="java.util.concurrent.Executors"
factory-method="newCachedThreadPool"/>
  </constructor-arg>
  ...
</bean>

could work.

HTH

-- 
Niklas Therning
www.spamdrain.net