A plain jdbc implementation of the file system is a good idea. For our need we also need the application to be notified, I suppose this can be handled by a small ftplet.
A spring implementation should also be evaluated. We are using JPA+Spring for our implementation, and are currently testing JPA+Spring for the STORE command. Mvh Tore Storødegård [EMAIL PROTECTED] Mobinor AS - For deg som trenger bistand til utvikling og drift av nettbaserte løsninger (www.mobinor.no) Timebox AS - For deg som trenger hjelp til realisering av ideer og it baserte prosjekter (www.timebox.no) Mobilfoto AS - For deg som ønsker å fremkalle bider på mobiltelefon (www.mobilfoto.no) Zlip AS - For deg som ønsker å tilby en trådløse sone til venner og kunder (www.zlip.no) Alle dyr, bortsett fra mennesket, vet at den eneste meningen med livet er å nyte det. Samuel Butler -----Opprinnelig melding----- Fra: Niklas Gustavsson [mailto:[EMAIL PROTECTED] Sendt: 25. august 2008 13:28 Til: [email protected] Emne: Re: Request: Direct access to inputstream from On Mon, Aug 25, 2008 at 11:26 AM, mobic.com <[EMAIL PROTECTED]> wrote: > I must admit that I have not studied the implementation of MINA ftp in > detail, so I will rather describe our need. > > Our intent is to store a file as a blob directly in a database, not using > the file system. A very quick implementation is this one line code: > > Hibernate.createBlob(inputstream) > > This requires access to the data as an inputstream. > > To get access to the stream we have created our own STOR command, and we > then have to convert the outputstream to an inputstream to be able to use > the Hibernate util. > > With the current implementation of the IODataConnection it seams very simple > to get access to the inputstream. If you intent to change the design this > might be another case. If so, please evaluate our need and implement a > proper solution. Store data directly into a database will be a very > important usage of an embedded MINA ftp server. > > Please tell if you have better ways of using MINAftp for storing files > directly into a database. The "normal" way of doing this would be to create a custom file system implementation. That way, your storage would work with any of the FTP commands, like listing or any of the storage commands (STOR, STOU, APPE). I would like to have a plain JDBC based file system implementation as part of the project. /niklas
