mina-ftpserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Gosch" <christian.go...@inovex.de>
Subject RE: FTPlet entrySet: Sort order for multiple active FTPlets?
Date Fri, 18 Mar 2011 13:57:34 GMT
... should better read the sources ...

... sorry for storm in glass of water ...

The DefaultFtpletContainer in fact instantiates the ftplets Map as 
ConcurrentHashMap<String, Ftplet>, but the usual constructor is 
DefaultFtpletContainer(Map<String, Ftplet> ftplets), which then 
overwrites the ftplets Map with its parameter.

But nevertheless the Java default constructor DefaultFtpletContainer() 
is public and defined. Thus, I think if no specific Map implementation 
is given by configuration, the DefaultFtpletContainer falls back to 
ConcurrentHashMap.


--cg

> -----Original Message-----
> From: Sai Pullabhotla [mailto:sai.pullabhotla@jmethods.com]
> Sent: Friday, March 18, 2011 2:09 PM
> To: ftpserver-users@mina.apache.org
> Subject: Re: FTPlet entrySet: Sort order for multiple active FTPlets?
> 
> Well... there was a open case about this, which is now closed...
> 
> https://issues.apache.org/jira/browse/FTPSERVER-223
> 
> Are you sure this is still an issue?
> 
> On Fri, Mar 18, 2011 at 7:46 AM, Christian Gosch
> <christian.gosch@inovex.de> wrote:
> > Hi,
> >
> > I just looked at the implementation of
> > DefaultFtpletContainer.onConnect() and saw that it processes all
> > contained (registered) Ftplets by traversing the (concurrent hash) 
map
> > of declared Ftplets, just as onDisconnect().
> >
> > But it does so based on the ftplets.entrySet() and the sort order 
which
> > it imposes on the entry set, which in turn is "undefined" in that it
> > does not guarantee any special sort order.
> >
> > Why is the concurrent map ftplets not implemented as a map with a
> > reliable sort order depending on the key values?
> >
> > It may be good practice to have every registered Ftplet act
> > independently of any other in the same container, but there may be 
good
> > reasons to have an ordered sequence, may be by order of declaration, 
or
> > by order of key or whatever may be appropriate.
> >
> > Is there a special rationale behind this?
> >
> >
> > btw: I did not yet find any time to play around with this really :-(
> >
> >
> > Regards,
> > --
> > Dipl.-Inform. Christian Gosch, PMI PMP
> > Systems Architecture, Project Management
> >
> > inovex GmbH
> > Büro Pforzheim
> > Karlsruher Strasse 71
> > D-75179 Pforzheim
> > Tel: +49 (0)7231 3191-85
> > Fax: +49 (0)7231 3191-91
> > c.gosch@inovex.de
> > www.inovex.de
> >
> > Sitz der Gesellschaft: Pforzheim
> > AG Mannheim, HRB 502126
> > Geschäftsführer: Stephan Müller
> >
> >
> >
> >
> 
> !DSPAM:4d83598117594243614118!
> 
> 



Mime
View raw message