Hi Niklas,

I took a look at the Spring integration package today as you suggested, and it looks very promising. 

One of my implementations of MINA is as a client, so I assume that the SocketConnectorFactoryBean class is what I would need to use to get my Socket connection going.  It looks kind of incomplete at the moment.  Is that the case?  I couldn't find the AbstractIoConnectorFactoryBean class in the JavaDocs and so therefore I'm not sure how you would configure it.  Also, will there be a way to add a custom ProtocolCodecFactory to the filterChain and configure that with Spring?

Any information on this would be extremely appreciated.

Another thing that I would love to see happen is for you guys to add some complete Spring examples on the website here: http://directory.apache.org/subprojects/network/getting_started.html

All in good time I'm sure. ;-)

Anyway, keep up the great work!


On 12/21/05, Niklas Therning <niklas@trillian.se> wrote:
Ither Seed wrote:
>>From: Niklas Therning <niklas@trillian.se>
>>To: Apache Directory Developers List <dev@directory.apache.org >
>>Date: Wed, 21 Dec 2005 07:38:20 +0100
>>Subject: Re: [MINA] getting accesss to the IoSession from another Thread
>>Chris Allen wrote:
>>>In another topic, I'm curious about what you guys are doing in terms
>>>of Spring integration.  I saw that this was listed on your road map
>>>and I would like to learn more about it.
>>Hi Chris,
>>At the moment there are a number of Spring FactoryBeans in
>>org.apache.mina.integration.spring which simplifies the
>>configuration of
>>IoAcceptors and IoConnectors using Spring. There are also some
>>FactoryBeans which helps you set up KeyStores and SSLContexts for use
>>with the SSLFilter. Have a look at the Javadocs for
>>SocketAcceptorFactoryBean for a short example on how to use it. If you
>>have any further questions or suggestions for improvements please let me
>>BTW, the Spring integration package was introduced in 0.9.0.
> Hi, people. I'm trying to use the FactoryBeans of MINA 0.9.0. I read
> the javadoc in the SocketAcceptorFactoryBean class and I successfully
> create a SocketAcceptor using it but I don't know how to make it wait
> for connections. All the examples use the ServiceRegistry interface
> for this. am I missing something? Thanks in advance.

You don't have to do anything! SocketAcceptor.bind() will be called for
each of the Bindings you set on your SocketAcceptor in your Spring file.
Just make sure you have configured some bindings.

If you are using Spring's FileSystemApplicationContext to load you
Spring XML file all the beans you define will be automatically created
at load time. For other ApplicationContext implementations you may have
to call refresh() on it for the beans to be instantiated.

If you are using a BeanFactory such as XmlBeanFactory Spring will
instantiate your beans lazily when retrieved from the BeanFactory. In
that case you will have to call getBean() on the BeanFactory and supply
the id of the SocketAcceptorFactoryBean before Spring will create it.