Hello.

That is interesting.

When I change the createOutputStream method to the following it
appears to work and doesn't throw the exception.

    private static byte[] staticBytes = "I am a static byte string".getBytes();

    /**
     *
     * @param offset
     *  @return
     * @throws IOException
     */
    public InputStream createInputStream(long offset) throws IOException
    {

        //Code in here to open the database and get stream,
        try
        {
            return new ByteArrayInputStream(staticBytes);
        }
        catch (Exception e)
        {

        }

        return null;
    }

What I am doing is trying to transfer 300k of data from upto 40
virtual IP addresses. This may occur at the same time.

I have put my code back to the original code and it appears to be
working now. I will let it run for a bit and see what happens.  I have
noticed that sometime when I restart the server on the windows machine
it will work, and other times it will not.


Cheers for the ongoing help






On 29 November 2010 19:50, Niklas Gustavsson <[email protected]> wrote:
>> I have a single FTPLet coded that uses the beforeCommand and afterCommand.
>> The afterCommand on PASS sets the client IP address and the
>> MessageEndpointFactory.
>>
>>
>> When the NIOListener receives an RETR (from the server on any of the Virtual
>> IP addresses), it goes through the normal RETR class in Apache FTP server
>> and calls the MySystemFactory and classes in order to get the
>> ByteArrayOutputStream.
>
> To reduce the test case further, could you remove the IP handling
> stuff, the DAOs and the zipping and simple return a constant byte
> array. Are you still seeing the same problem? If so, please provide
> that as a use case.
>
> /niklas
>

Reply via email to