hey Niklas,

Thanks for the response!

What I want to do is this sort of scenario:
- The user logs in
- The user starts to upload
- When the upload event hits my ftp server, I want to make a new entry in my DB with some info surrounding the uploaded content/user

To do the 3rd step, I need to start a transactional session before writing to the DB. But if the uploadevent is called with a session auto-started, I won't need to write the session/transaction code into the event callback.

So, just wondering if there's a way to set a transactional manager to ftp server so that any event callbacks will be in a transactional session automagically.

Thanks!
koichi

On Jan 20, 2009, at 1:14 PM, Niklas Gustavsson wrote:

On Tue, Jan 20, 2009 at 9:52 PM, Koichi Tsunoda <[email protected] > wrote:
I want to be able to write to a DB when certain events happen. I can create my own session and transaction and call it a day, but I'm wondering if
there's an easy way to make the events automatically happen in a
transaction.

Could you describe more precisely what you mean with transactional.
The FTP protocol itself does not contain transactionality, but in some
ways you could probably simulate it, like using QUIT as a commit
statement.

/niklas



Reply via email to