plissken
Jan 26th, 2010, 02:58 AM
Hi,
I'd like to implement a service to store files on mass storage. Let's see some code sample as follow:
class Something implements StoreBean {
// bla bla bla some attributes
private String path;
// getters and setters of course bla bla bla
}
interface StoreBean {
public String getPath();
}
What is a idea ? Shortly... service implementing declarative transactions should save 'Something' object to database, save some file indicated by 'path' attribute on disk, and ... if db transaction fails, some transactionmanager should delete file from disk. I need some advices, what is a best solution to above scenario ??
Regards
Tom
I'd like to implement a service to store files on mass storage. Let's see some code sample as follow:
class Something implements StoreBean {
// bla bla bla some attributes
private String path;
// getters and setters of course bla bla bla
}
interface StoreBean {
public String getPath();
}
What is a idea ? Shortly... service implementing declarative transactions should save 'Something' object to database, save some file indicated by 'path' attribute on disk, and ... if db transaction fails, some transactionmanager should delete file from disk. I need some advices, what is a best solution to above scenario ??
Regards
Tom