You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Rob Butler <cr...@yahoo.com> on 2006/06/20 03:49:47 UTC
Bug in DatagramAcceptor or DatagramAcceptorConfig?
Hello all,
I just started using the Spring integration package
for Mina 0.9.4 and ran into a problem. It seems as
though the DatagramAcceptor doesn't make use of the
DatagramAcceptorConfig properly because any filters in
the config are not used.
To confirm this was not a spring specific problem I
re-implemented all the configuration in code. Please
see below:
IoAcceptor datagramAcceptor = new DatagramAcceptor();
IoAcceptor socketAcceptor = new SocketAcceptor();
DefaultIoFilterChainBuilder fcBuilder = new
DefaultIoFilterChainBuilder();
fcBuilder.addLast("LOGGER", new LoggingFilter());
fcBuilder.addLast("CODEC", new ProtocolCodecFilter(new
MyCodecFactory()));
DatagramAcceptorConfig datagramConfig = new
DatagramAcceptorConfig();
datagramConfig.setFilterChainBuilder(fcBuilder);
SocketAcceptorConfig socketConfig = new
SocketAcceptorConfig();
socketConfig.setFilterChainBuilder(fcBuilder);
socketAcceptor.bind(new InetSocketAddress( PORT ), new
MyProtocolHandler(), socketConfig);
datagramAcceptor.bind(new InetSocketAddress( PORT ),
new MyProtocolHandler(), datagramConfig);
As you can see the same DefaultIoFilterChainBuilder is
being used for both the SocketAcceptor and the
DatagramAcceptor. The SocketAcceptor works fine and
all filters and the codec are invoked. The
DatagramAcceptor does nothing and no filters are
invoked. If I manually register the filters in the
MyProtocolHandler.sessionCreated method everything
works fine. But I'd rather control these using the
acceptorConfigs.
Is this a bug?
Thanks
Rob
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: Bug in DatagramAcceptor or DatagramAcceptorConfig?
Posted by Trustin Lee <tr...@gmail.com>.
Hi Rob,
On 6/21/06, Rob Butler <cr...@yahoo.com> wrote:
>
>
> > We will release 0.9.5 when the following issues are
> > resolved:
> >
> >
>
> http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&mode=hide&sorter/order=DESC&sorter/field=priority&resolution=-1&pid=10670&fixfor=12311032
> >
> > Some are trivial, but others are not. I think JMX
> > integration should be
> > included in the next release at least.
>
> You probably don't want to create additional
> dependencies, but the Spring framework's support for
> JMX is great! You just create a java bean as normal
> and then tell Spring which methods and getters/setters
> to expose in a JMX Mbean. That's it. Not that JMX is
> that hard anyways but this is even simpler.
This is an interesting idea that we might be able to use. :)
> When do you expect to go to 1.0?
> >
> >
> > I think we're not really far from 1.0. My wish is
> > to release 1.0 this
> > year. But we need more confidence that MINA's API
> > and functionality is
> > stablized enough. Please give us active feedback if
> > you have any problem so
> > we can fix as many design issues as we can before
> > releasing 1.0. :)
>
> Well I'm really happy with the move from 0.8.2 to
> 0.9.4 with general Exception(s) being thrown from the
> encoder/decoder/ioHandler instead of a mina specific
> subclass of Exception. Good move!
Thank you!
> When you get another 0.9.x version can you place it
> > > into a Maven repo asap. It would be great if you
> > can
> > > put up the src jars along with the binaries in
> > Maven.
> >
> >
> > Do you know how to put source JAR into a Maven repo?
> > I want to do so right
> > now if I know how to do so. :)
>
> I don't know if you can put just a source jar into a
> repo if it will do any good. Maven is primarily about
> compiled jar's and the src jars are for reference in
> your IDE during debugging.
>
> I believe (rather new to Maven myself) that if you are
> using the xxx-SNAPSHOT versioning scheme (which Mina
> is) then you can/should put up a new version of your
> compiled (and source) jars every time you do a
> build.... Nightly if you do it every night.
>
> Downstream users Maven systems will check for an
> updated xxx-SNAPSHOT once a day by default or more
> often if forced with a command line switch. It does
> this checking when you invoke mvn for compile/install,
> etc.
>
> I don't know if it will help, but I found these
> instructions for putting a jar and source-jar up to
> iBiblio.
> http://maven.apache.org/guides/mini/guide-ibiblio-upload.html
>
> Mergere (the commercial entity behind Maven now) has
> put out a pretty ok book about maven. It's available
> as a free PDF download from here:
> http://www.mergere.com/m2book_download.jsp You
> probably don't need it since you've been using Maven
> for a bit, but it is a good reference at times too.
>
> Thanks again, and if you end up putting the
> xxx-SNAPSHOT versions up somewhere please let me know.
Yes, I need to find out how to include source JAR from manuals. Thank you
for the links!
Regards,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
Re: Bug in DatagramAcceptor or DatagramAcceptorConfig?
Posted by Rob Butler <cr...@yahoo.com>.
> We will release 0.9.5 when the following issues are
> resolved:
>
>
http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&mode=hide&sorter/order=DESC&sorter/field=priority&resolution=-1&pid=10670&fixfor=12311032
>
> Some are trivial, but others are not. I think JMX
> integration should be
> included in the next release at least.
You probably don't want to create additional
dependencies, but the Spring framework's support for
JMX is great! You just create a java bean as normal
and then tell Spring which methods and getters/setters
to expose in a JMX Mbean. That's it. Not that JMX is
that hard anyways but this is even simpler.
> When do you expect to go to 1.0?
>
>
> I think we're not really far from 1.0. My wish is
> to release 1.0 this
> year. But we need more confidence that MINA's API
> and functionality is
> stablized enough. Please give us active feedback if
> you have any problem so
> we can fix as many design issues as we can before
> releasing 1.0. :)
Well I'm really happy with the move from 0.8.2 to
0.9.4 with general Exception(s) being thrown from the
encoder/decoder/ioHandler instead of a mina specific
subclass of Exception. Good move!
> When you get another 0.9.x version can you place it
> > into a Maven repo asap. It would be great if you
> can
> > put up the src jars along with the binaries in
> Maven.
>
>
> Do you know how to put source JAR into a Maven repo?
> I want to do so right
> now if I know how to do so. :)
I don't know if you can put just a source jar into a
repo if it will do any good. Maven is primarily about
compiled jar's and the src jars are for reference in
your IDE during debugging.
I believe (rather new to Maven myself) that if you are
using the xxx-SNAPSHOT versioning scheme (which Mina
is) then you can/should put up a new version of your
compiled (and source) jars every time you do a
build.... Nightly if you do it every night.
Downstream users Maven systems will check for an
updated xxx-SNAPSHOT once a day by default or more
often if forced with a command line switch. It does
this checking when you invoke mvn for compile/install,
etc.
I don't know if it will help, but I found these
instructions for putting a jar and source-jar up to
iBiblio.
http://maven.apache.org/guides/mini/guide-ibiblio-upload.html
Mergere (the commercial entity behind Maven now) has
put out a pretty ok book about maven. It's available
as a free PDF download from here:
http://www.mergere.com/m2book_download.jsp You
probably don't need it since you've been using Maven
for a bit, but it is a good reference at times too.
Thanks again, and if you end up putting the
xxx-SNAPSHOT versions up somewhere please let me know.
Rob
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: Bug in DatagramAcceptor or DatagramAcceptorConfig?
Posted by Trustin Lee <tr...@gmail.com>.
On 6/20/06, Rob Butler <cr...@yahoo.com> wrote:
>
> No problem. Thank you for cranking out a fix right
> away! I'll try the fix as soon as I can.
>
> When will you be putting out another 0.9.x version?
We will release 0.9.5 when the following issues are resolved:
http://issues.apache.org/jira/secure/IssueNavigator.jspa?reset=true&mode=hide&sorter/order=DESC&sorter/field=priority&resolution=-1&pid=10670&fixfor=12311032
Some are trivial, but others are not. I think JMX integration should be
included in the next release at least.
When do you expect to go to 1.0?
I think we're not really far from 1.0. My wish is to release 1.0 this
year. But we need more confidence that MINA's API and functionality is
stablized enough. Please give us active feedback if you have any problem so
we can fix as many design issues as we can before releasing 1.0. :)
When you get another 0.9.x version can you place it
> into a Maven repo asap. It would be great if you can
> put up the src jars along with the binaries in Maven.
Do you know how to put source JAR into a Maven repo? I want to do so right
now if I know how to do so. :)
Thanks again!
You're welcome, and thank you for your bug reporting! :)
HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
Re: Bug in DatagramAcceptor or DatagramAcceptorConfig?
Posted by Rob Butler <cr...@yahoo.com>.
No problem. Thank you for cranking out a fix right
away! I'll try the fix as soon as I can.
When will you be putting out another 0.9.x version?
When do you expect to go to 1.0?
When you get another 0.9.x version can you place it
into a Maven repo asap. It would be great if you can
put up the src jars along with the binaries in Maven.
Thanks again!
Rob
--- Trustin Lee <tr...@gmail.com> wrote:
> Thank you for reporting a major bug!
>
> I've just checked in the fix so you can try the
> trunk.
>
> HTH,
> Trustin
>
> On 6/20/06, Rob Butler <cr...@yahoo.com> wrote:
> >
> > FYI - even calling
> > datagramAcceptor.setFilterChainBuilder(fcBuilder);
> > doesn't work. So I would wager the bug is in the
> > DatagramAcceptor.
> >
> > Rob
> >
> > --- Rob Butler <cr...@yahoo.com> wrote:
> >
> > > Hello all,
> > >
> > > I just started using the Spring integration
> package
> > > for Mina 0.9.4 and ran into a problem. It seems
> as
> > > though the DatagramAcceptor doesn't make use of
> the
> > > DatagramAcceptorConfig properly because any
> filters
> > > in
> > > the config are not used.
> > >
> > > To confirm this was not a spring specific
> problem I
> > > re-implemented all the configuration in code.
> > > Please
> > > see below:
> > >
> > > IoAcceptor datagramAcceptor = new
> > > DatagramAcceptor();
> > > IoAcceptor socketAcceptor = new
> SocketAcceptor();
> > >
> > > DefaultIoFilterChainBuilder fcBuilder = new
> > > DefaultIoFilterChainBuilder();
> > > fcBuilder.addLast("LOGGER", new
> LoggingFilter());
> > > fcBuilder.addLast("CODEC", new
> > > ProtocolCodecFilter(new
> > > MyCodecFactory()));
> > >
> > > DatagramAcceptorConfig datagramConfig = new
> > > DatagramAcceptorConfig();
> > > datagramConfig.setFilterChainBuilder(fcBuilder);
> > >
> > > SocketAcceptorConfig socketConfig = new
> > > SocketAcceptorConfig();
> > > socketConfig.setFilterChainBuilder(fcBuilder);
> > >
> > >
> > >
> > > socketAcceptor.bind(new InetSocketAddress( PORT
> ),
> > > new
> > > MyProtocolHandler(), socketConfig);
> > > datagramAcceptor.bind(new InetSocketAddress(
> PORT ),
> > > new MyProtocolHandler(), datagramConfig);
> > >
> > > As you can see the same
> DefaultIoFilterChainBuilder
> > > is
> > > being used for both the SocketAcceptor and the
> > > DatagramAcceptor. The SocketAcceptor works fine
> and
> > > all filters and the codec are invoked. The
> > > DatagramAcceptor does nothing and no filters are
> > > invoked. If I manually register the filters in
> the
> > > MyProtocolHandler.sessionCreated method
> everything
> > > works fine. But I'd rather control these using
> the
> > > acceptorConfigs.
> > >
> > > Is this a bug?
> > >
> > > Thanks
> > > Rob
> > >
> > >
> __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam? Yahoo! Mail has the best spam
> > > protection around
> > > http://mail.yahoo.com
> > >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> protection around
> > http://mail.yahoo.com
> >
>
>
>
> --
> what we call human nature is actually human habit
> --
> http://gleamynode.net/
> --
> PGP key fingerprints:
> * E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E
> * B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Re: Bug in DatagramAcceptor or DatagramAcceptorConfig?
Posted by Trustin Lee <tr...@gmail.com>.
Thank you for reporting a major bug!
I've just checked in the fix so you can try the trunk.
HTH,
Trustin
On 6/20/06, Rob Butler <cr...@yahoo.com> wrote:
>
> FYI - even calling
> datagramAcceptor.setFilterChainBuilder(fcBuilder);
> doesn't work. So I would wager the bug is in the
> DatagramAcceptor.
>
> Rob
>
> --- Rob Butler <cr...@yahoo.com> wrote:
>
> > Hello all,
> >
> > I just started using the Spring integration package
> > for Mina 0.9.4 and ran into a problem. It seems as
> > though the DatagramAcceptor doesn't make use of the
> > DatagramAcceptorConfig properly because any filters
> > in
> > the config are not used.
> >
> > To confirm this was not a spring specific problem I
> > re-implemented all the configuration in code.
> > Please
> > see below:
> >
> > IoAcceptor datagramAcceptor = new
> > DatagramAcceptor();
> > IoAcceptor socketAcceptor = new SocketAcceptor();
> >
> > DefaultIoFilterChainBuilder fcBuilder = new
> > DefaultIoFilterChainBuilder();
> > fcBuilder.addLast("LOGGER", new LoggingFilter());
> > fcBuilder.addLast("CODEC", new
> > ProtocolCodecFilter(new
> > MyCodecFactory()));
> >
> > DatagramAcceptorConfig datagramConfig = new
> > DatagramAcceptorConfig();
> > datagramConfig.setFilterChainBuilder(fcBuilder);
> >
> > SocketAcceptorConfig socketConfig = new
> > SocketAcceptorConfig();
> > socketConfig.setFilterChainBuilder(fcBuilder);
> >
> >
> >
> > socketAcceptor.bind(new InetSocketAddress( PORT ),
> > new
> > MyProtocolHandler(), socketConfig);
> > datagramAcceptor.bind(new InetSocketAddress( PORT ),
> > new MyProtocolHandler(), datagramConfig);
> >
> > As you can see the same DefaultIoFilterChainBuilder
> > is
> > being used for both the SocketAcceptor and the
> > DatagramAcceptor. The SocketAcceptor works fine and
> > all filters and the codec are invoked. The
> > DatagramAcceptor does nothing and no filters are
> > invoked. If I manually register the filters in the
> > MyProtocolHandler.sessionCreated method everything
> > works fine. But I'd rather control these using the
> > acceptorConfigs.
> >
> > Is this a bug?
> >
> > Thanks
> > Rob
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam? Yahoo! Mail has the best spam
> > protection around
> > http://mail.yahoo.com
> >
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41 4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4 455E 1C62 A7DC 0255 ECA6
Re: Bug in DatagramAcceptor or DatagramAcceptorConfig?
Posted by Rob Butler <cr...@yahoo.com>.
FYI - even calling
datagramAcceptor.setFilterChainBuilder(fcBuilder);
doesn't work. So I would wager the bug is in the
DatagramAcceptor.
Rob
--- Rob Butler <cr...@yahoo.com> wrote:
> Hello all,
>
> I just started using the Spring integration package
> for Mina 0.9.4 and ran into a problem. It seems as
> though the DatagramAcceptor doesn't make use of the
> DatagramAcceptorConfig properly because any filters
> in
> the config are not used.
>
> To confirm this was not a spring specific problem I
> re-implemented all the configuration in code.
> Please
> see below:
>
> IoAcceptor datagramAcceptor = new
> DatagramAcceptor();
> IoAcceptor socketAcceptor = new SocketAcceptor();
>
> DefaultIoFilterChainBuilder fcBuilder = new
> DefaultIoFilterChainBuilder();
> fcBuilder.addLast("LOGGER", new LoggingFilter());
> fcBuilder.addLast("CODEC", new
> ProtocolCodecFilter(new
> MyCodecFactory()));
>
> DatagramAcceptorConfig datagramConfig = new
> DatagramAcceptorConfig();
> datagramConfig.setFilterChainBuilder(fcBuilder);
>
> SocketAcceptorConfig socketConfig = new
> SocketAcceptorConfig();
> socketConfig.setFilterChainBuilder(fcBuilder);
>
>
>
> socketAcceptor.bind(new InetSocketAddress( PORT ),
> new
> MyProtocolHandler(), socketConfig);
> datagramAcceptor.bind(new InetSocketAddress( PORT ),
> new MyProtocolHandler(), datagramConfig);
>
> As you can see the same DefaultIoFilterChainBuilder
> is
> being used for both the SocketAcceptor and the
> DatagramAcceptor. The SocketAcceptor works fine and
> all filters and the codec are invoked. The
> DatagramAcceptor does nothing and no filters are
> invoked. If I manually register the filters in the
> MyProtocolHandler.sessionCreated method everything
> works fine. But I'd rather control these using the
> acceptorConfigs.
>
> Is this a bug?
>
> Thanks
> Rob
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
> protection around
> http://mail.yahoo.com
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com