SlideShare a Scribd company logo
Transactional File System in Java – commons transaction Albert Guo [email_address]
Agenda CMCS Scenario Commons Transaction Commons Transaction Implementation Conclusion
CMCS Scenario
System Architecture CIS Green Windchill Project Management Document Management Change Management Pro/E Wildfire Pro/E Work Space Pro/E PDMLink Supplier Management GSM Product Management (Part /BOM) Interface Table SAP ERP ProjectLink ODBC xmls, files
Scenario
Commons Transaction
Commons Transaction http://commons.apache.org/transaction/
What is Commons Transaction Whenever you have concurrent access to resources and want to protect them with locks,  Commons Transaction   can be right for you. Providing  lightweight, standardized, well tested and efficient implementations  of utility classes commonly used in transactional Java programming.  The 1.x component is compatible to  JDK1.2 .
Commons Transaction Features Commons Transaction might be useful for you when you need transactional file access (i.e. ACID transactions on a set of files) have resources that need locking - lock managers can do that for you: be sure you never forget to release a lock again  let your code have a timer for a whole block of locks  have an out-of-the-box solution for hierarchical locks  plug in your own custom or advanced solutions
Commons Transaction Implementation
Implementation Steps
1. Initialize FileResourceManager
2. Initialize FileResourceManager  storeDir String - JavaDoc says: "directory where main data should go after commit".  workDir String - JavaDoc says: directory where transactions store temporary data. next parameter is a boolean that indicates if the path should be URL encoded. In our example it is false, indicating that we have simple path with no spaces or i18n characters in it.  sLogger LoggerFacade - JavaDoc says: the logger to be used by this store.
3. Start FileResourceManager & Start Transaction
4. Modify Resources With the transaction started, you can begin file manipulation. You can perform following operations: copyResource  createResource  deleteResource  moveResource  writeResource In our example, we’ll demo createResource and writeResource
4. Modify Resources
5. Transaction Management
Conclusion
Conclusion If you have to operate on files and cannot afford to loose data, seriously consider using commons-transactions package.  It is probably better then any custom mechanism you can come up with. It supports 2 phase commit. With a little work, you could probably make it into an XA compliant resource.

More Related Content

What's hot (20)

Php functions
Php functionsPhp functions
Php functions
JIGAR MAKHIJA
 
Flask
FlaskFlask
Flask
Mamta Kumari
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
Tiji Thomas
 
HTML5
HTML5HTML5
HTML5
Hatem Mahmoud
 
Php operators
Php operatorsPhp operators
Php operators
Aashiq Kuchey
 
Web authentication & authorization
Web authentication & authorizationWeb authentication & authorization
Web authentication & authorization
Alexandru Pasaila
 
Introduction to back-end
Introduction to back-endIntroduction to back-end
Introduction to back-end
Mosaab Ehab
 
Git y github
Git y githubGit y github
Git y github
Jorge Garcia
 
Programacion web
Programacion webProgramacion web
Programacion web
Abraham Morales
 
Xml web services
Xml web servicesXml web services
Xml web services
Raghu nath
 
What is No-Code/Low-Code App Development and Why Should Your Business Care?
What is No-Code/Low-Code App Development and Why Should Your Business Care?What is No-Code/Low-Code App Development and Why Should Your Business Care?
What is No-Code/Low-Code App Development and Why Should Your Business Care?
kintone
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
Manish Bothra
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
shan km
 
JavaScript & Dom Manipulation
JavaScript & Dom ManipulationJavaScript & Dom Manipulation
JavaScript & Dom Manipulation
Mohammed Arif
 
C# REST API
C# REST APIC# REST API
C# REST API
Simplilearn
 
Software proyecto
Software proyectoSoftware proyecto
Software proyecto
dannyvelasco
 
Deep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionDeep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL Injection
Vishal Kumar
 
XML and Related Technologies - Web Technologies (1019888BNR)
XML and Related Technologies - Web Technologies (1019888BNR)XML and Related Technologies - Web Technologies (1019888BNR)
XML and Related Technologies - Web Technologies (1019888BNR)
Beat Signer
 
9 reasons why low code no-code platform is the best choice for increasing ado...
9 reasons why low code no-code platform is the best choice for increasing ado...9 reasons why low code no-code platform is the best choice for increasing ado...
9 reasons why low code no-code platform is the best choice for increasing ado...
Enterprise Bot
 
Metasploit
MetasploitMetasploit
Metasploit
Cristian Alejandro Rojas Quintero
 
Web authentication & authorization
Web authentication & authorizationWeb authentication & authorization
Web authentication & authorization
Alexandru Pasaila
 
Introduction to back-end
Introduction to back-endIntroduction to back-end
Introduction to back-end
Mosaab Ehab
 
Xml web services
Xml web servicesXml web services
Xml web services
Raghu nath
 
What is No-Code/Low-Code App Development and Why Should Your Business Care?
What is No-Code/Low-Code App Development and Why Should Your Business Care?What is No-Code/Low-Code App Development and Why Should Your Business Care?
What is No-Code/Low-Code App Development and Why Should Your Business Care?
kintone
 
Introduction to asp.net
Introduction to asp.netIntroduction to asp.net
Introduction to asp.net
shan km
 
JavaScript & Dom Manipulation
JavaScript & Dom ManipulationJavaScript & Dom Manipulation
JavaScript & Dom Manipulation
Mohammed Arif
 
Deep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL InjectionDeep understanding on Cross-Site Scripting and SQL Injection
Deep understanding on Cross-Site Scripting and SQL Injection
Vishal Kumar
 
XML and Related Technologies - Web Technologies (1019888BNR)
XML and Related Technologies - Web Technologies (1019888BNR)XML and Related Technologies - Web Technologies (1019888BNR)
XML and Related Technologies - Web Technologies (1019888BNR)
Beat Signer
 
9 reasons why low code no-code platform is the best choice for increasing ado...
9 reasons why low code no-code platform is the best choice for increasing ado...9 reasons why low code no-code platform is the best choice for increasing ado...
9 reasons why low code no-code platform is the best choice for increasing ado...
Enterprise Bot
 

Similar to Transactional File System In Java - Commons Transaction (16)

Transactional File System in Java – commons transaction
Transactional File System in Java – commons transactionTransactional File System in Java – commons transaction
Transactional File System in Java – commons transaction
Guo Albert
 
Javase7 1641812
Javase7 1641812Javase7 1641812
Javase7 1641812
Vinay H G
 
Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...
mfrancis
 
09 transactions new1
09 transactions new109 transactions new1
09 transactions new1
thirumuru2012
 
Legacy projects: how to win the race
Legacy projects: how to win the raceLegacy projects: how to win the race
Legacy projects: how to win the race
Victor_Cr
 
Java 7 Features and Enhancements
Java 7 Features and EnhancementsJava 7 Features and Enhancements
Java 7 Features and Enhancements
Gagan Agrawal
 
09 transactions new
09 transactions new09 transactions new
09 transactions new
thirumuru2012
 
file management_osnotes.ppt
file management_osnotes.pptfile management_osnotes.ppt
file management_osnotes.ppt
HelalMirzad
 
File system
File systemFile system
File system
Navin Royal Achakkagari
 
Project description2012
Project description2012Project description2012
Project description2012
ashish61_scs
 
Geode transactions
Geode transactionsGeode transactions
Geode transactions
Swapnil Bawaskar
 
Geode Transactions by Swapnil Bawaskar
Geode Transactions by Swapnil BawaskarGeode Transactions by Swapnil Bawaskar
Geode Transactions by Swapnil Bawaskar
PivotalOpenSourceHub
 
Apache Chemistry in Action
Apache Chemistry in ActionApache Chemistry in Action
Apache Chemistry in Action
Jeff Potts
 
Session 9 Tp9
Session 9 Tp9Session 9 Tp9
Session 9 Tp9
phanleson
 
operating system File - System Interface
operating system File - System Interfaceoperating system File - System Interface
operating system File - System Interface
Dr. Chandrakant Divate
 
Apache Utilities At Work V5
Apache Utilities At Work   V5Apache Utilities At Work   V5
Apache Utilities At Work V5
Tom Marrs
 
Transactional File System in Java – commons transaction
Transactional File System in Java – commons transactionTransactional File System in Java – commons transaction
Transactional File System in Java – commons transaction
Guo Albert
 
Javase7 1641812
Javase7 1641812Javase7 1641812
Javase7 1641812
Vinay H G
 
Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...Transaction Control – a Functional Approach to Modular Transaction Management...
Transaction Control – a Functional Approach to Modular Transaction Management...
mfrancis
 
09 transactions new1
09 transactions new109 transactions new1
09 transactions new1
thirumuru2012
 
Legacy projects: how to win the race
Legacy projects: how to win the raceLegacy projects: how to win the race
Legacy projects: how to win the race
Victor_Cr
 
Java 7 Features and Enhancements
Java 7 Features and EnhancementsJava 7 Features and Enhancements
Java 7 Features and Enhancements
Gagan Agrawal
 
file management_osnotes.ppt
file management_osnotes.pptfile management_osnotes.ppt
file management_osnotes.ppt
HelalMirzad
 
Project description2012
Project description2012Project description2012
Project description2012
ashish61_scs
 
Geode Transactions by Swapnil Bawaskar
Geode Transactions by Swapnil BawaskarGeode Transactions by Swapnil Bawaskar
Geode Transactions by Swapnil Bawaskar
PivotalOpenSourceHub
 
Apache Chemistry in Action
Apache Chemistry in ActionApache Chemistry in Action
Apache Chemistry in Action
Jeff Potts
 
Session 9 Tp9
Session 9 Tp9Session 9 Tp9
Session 9 Tp9
phanleson
 
operating system File - System Interface
operating system File - System Interfaceoperating system File - System Interface
operating system File - System Interface
Dr. Chandrakant Divate
 
Apache Utilities At Work V5
Apache Utilities At Work   V5Apache Utilities At Work   V5
Apache Utilities At Work V5
Tom Marrs
 
Ad

More from Guo Albert (20)

AWS IAM (Identity and Access Management) Policy Simulator
AWS IAM (Identity and Access Management) Policy SimulatorAWS IAM (Identity and Access Management) Policy Simulator
AWS IAM (Identity and Access Management) Policy Simulator
Guo Albert
 
TOEIC 準備心得
TOEIC 準備心得TOEIC 準備心得
TOEIC 準備心得
Guo Albert
 
DBM專案環境建置
DBM專案環境建置DBM專案環境建置
DBM專案環境建置
Guo Albert
 
JPA Optimistic Locking With @Version
JPA Optimistic Locking With @VersionJPA Optimistic Locking With @Version
JPA Optimistic Locking With @Version
Guo Albert
 
OCEJPA Study Notes
OCEJPA Study NotesOCEJPA Study Notes
OCEJPA Study Notes
Guo Albert
 
OCEJPA(1Z0-898) Preparation Tips
OCEJPA(1Z0-898) Preparation TipsOCEJPA(1Z0-898) Preparation Tips
OCEJPA(1Z0-898) Preparation Tips
Guo Albert
 
JPA lifecycle events practice
JPA lifecycle events practiceJPA lifecycle events practice
JPA lifecycle events practice
Guo Albert
 
XDate - a modern java-script date library
XDate -  a modern java-script date libraryXDate -  a modern java-script date library
XDate - a modern java-script date library
Guo Albert
 
How to avoid check style errors
How to avoid check style errorsHow to avoid check style errors
How to avoid check style errors
Guo Albert
 
NIG系統報表開發指南
NIG系統報表開發指南NIG系統報表開發指南
NIG系統報表開發指南
Guo Albert
 
Ease Your Effort of Putting Data into History Table
Ease Your Effort of Putting Data into History TableEase Your Effort of Putting Data into History Table
Ease Your Effort of Putting Data into History Table
Guo Albert
 
NIG 系統開發指引
NIG 系統開發指引NIG 系統開發指引
NIG 系統開發指引
Guo Albert
 
NIG系統開發文件閱讀步驟
NIG系統開發文件閱讀步驟NIG系統開發文件閱讀步驟
NIG系統開發文件閱讀步驟
Guo Albert
 
Form Bean Creation Process for NIG System
Form Bean Creation Process for NIG SystemForm Bean Creation Process for NIG System
Form Bean Creation Process for NIG System
Guo Albert
 
A Short Intorduction to JasperReports
A Short Intorduction to JasperReportsA Short Intorduction to JasperReports
A Short Intorduction to JasperReports
Guo Albert
 
Apply Template Method Pattern in Report Implementation
Apply Template Method Pattern in Report ImplementationApply Template Method Pattern in Report Implementation
Apply Template Method Pattern in Report Implementation
Guo Albert
 
Utilize Commons BeansUtils to do copy object
Utilize Commons BeansUtils to do copy objectUtilize Commons BeansUtils to do copy object
Utilize Commons BeansUtils to do copy object
Guo Albert
 
Apply my eclipse to do entity class generation
Apply my eclipse to do entity class generationApply my eclipse to do entity class generation
Apply my eclipse to do entity class generation
Guo Albert
 
Nig project setup quickly tutorial
Nig project setup quickly tutorialNig project setup quickly tutorial
Nig project setup quickly tutorial
Guo Albert
 
Spring JDBCTemplate
Spring JDBCTemplateSpring JDBCTemplate
Spring JDBCTemplate
Guo Albert
 
AWS IAM (Identity and Access Management) Policy Simulator
AWS IAM (Identity and Access Management) Policy SimulatorAWS IAM (Identity and Access Management) Policy Simulator
AWS IAM (Identity and Access Management) Policy Simulator
Guo Albert
 
TOEIC 準備心得
TOEIC 準備心得TOEIC 準備心得
TOEIC 準備心得
Guo Albert
 
DBM專案環境建置
DBM專案環境建置DBM專案環境建置
DBM專案環境建置
Guo Albert
 
JPA Optimistic Locking With @Version
JPA Optimistic Locking With @VersionJPA Optimistic Locking With @Version
JPA Optimistic Locking With @Version
Guo Albert
 
OCEJPA Study Notes
OCEJPA Study NotesOCEJPA Study Notes
OCEJPA Study Notes
Guo Albert
 
OCEJPA(1Z0-898) Preparation Tips
OCEJPA(1Z0-898) Preparation TipsOCEJPA(1Z0-898) Preparation Tips
OCEJPA(1Z0-898) Preparation Tips
Guo Albert
 
JPA lifecycle events practice
JPA lifecycle events practiceJPA lifecycle events practice
JPA lifecycle events practice
Guo Albert
 
XDate - a modern java-script date library
XDate -  a modern java-script date libraryXDate -  a modern java-script date library
XDate - a modern java-script date library
Guo Albert
 
How to avoid check style errors
How to avoid check style errorsHow to avoid check style errors
How to avoid check style errors
Guo Albert
 
NIG系統報表開發指南
NIG系統報表開發指南NIG系統報表開發指南
NIG系統報表開發指南
Guo Albert
 
Ease Your Effort of Putting Data into History Table
Ease Your Effort of Putting Data into History TableEase Your Effort of Putting Data into History Table
Ease Your Effort of Putting Data into History Table
Guo Albert
 
NIG 系統開發指引
NIG 系統開發指引NIG 系統開發指引
NIG 系統開發指引
Guo Albert
 
NIG系統開發文件閱讀步驟
NIG系統開發文件閱讀步驟NIG系統開發文件閱讀步驟
NIG系統開發文件閱讀步驟
Guo Albert
 
Form Bean Creation Process for NIG System
Form Bean Creation Process for NIG SystemForm Bean Creation Process for NIG System
Form Bean Creation Process for NIG System
Guo Albert
 
A Short Intorduction to JasperReports
A Short Intorduction to JasperReportsA Short Intorduction to JasperReports
A Short Intorduction to JasperReports
Guo Albert
 
Apply Template Method Pattern in Report Implementation
Apply Template Method Pattern in Report ImplementationApply Template Method Pattern in Report Implementation
Apply Template Method Pattern in Report Implementation
Guo Albert
 
Utilize Commons BeansUtils to do copy object
Utilize Commons BeansUtils to do copy objectUtilize Commons BeansUtils to do copy object
Utilize Commons BeansUtils to do copy object
Guo Albert
 
Apply my eclipse to do entity class generation
Apply my eclipse to do entity class generationApply my eclipse to do entity class generation
Apply my eclipse to do entity class generation
Guo Albert
 
Nig project setup quickly tutorial
Nig project setup quickly tutorialNig project setup quickly tutorial
Nig project setup quickly tutorial
Guo Albert
 
Spring JDBCTemplate
Spring JDBCTemplateSpring JDBCTemplate
Spring JDBCTemplate
Guo Albert
 
Ad

Recently uploaded (20)

Commercial Banks Management Unit-2 Risks Faced by Commercial Banks.pptx
Commercial Banks Management Unit-2 Risks Faced by Commercial Banks.pptxCommercial Banks Management Unit-2 Risks Faced by Commercial Banks.pptx
Commercial Banks Management Unit-2 Risks Faced by Commercial Banks.pptx
aachalmagar86
 
Enhancing MLM Platforms Through Advanced Communication Tools
Enhancing MLM Platforms Through Advanced Communication ToolsEnhancing MLM Platforms Through Advanced Communication Tools
Enhancing MLM Platforms Through Advanced Communication Tools
Epixel MLM Software
 
DIGIPIN : The new Digital Address system in India - How It can Help Pharma In...
DIGIPIN : The new Digital Address system in India - How It can Help Pharma In...DIGIPIN : The new Digital Address system in India - How It can Help Pharma In...
DIGIPIN : The new Digital Address system in India - How It can Help Pharma In...
Satya Mahesh Kallakuru
 
Thermal Energy Investor slide deck - June 2025
Thermal Energy Investor slide deck - June 2025Thermal Energy Investor slide deck - June 2025
Thermal Energy Investor slide deck - June 2025
Marketing847413
 
MNC - Simpatico PR B2B PR agency case study 0625.pdf
MNC - Simpatico PR B2B PR agency case study 0625.pdfMNC - Simpatico PR B2B PR agency case study 0625.pdf
MNC - Simpatico PR B2B PR agency case study 0625.pdf
Simpatico PR
 
Eco Packing experts Australia Catalogues
Eco Packing experts Australia CataloguesEco Packing experts Australia Catalogues
Eco Packing experts Australia Catalogues
Samsmith644393
 
How to Quickly Hire Java Developers for Java App Development and IT Outsourci...
How to Quickly Hire Java Developers for Java App Development and IT Outsourci...How to Quickly Hire Java Developers for Java App Development and IT Outsourci...
How to Quickly Hire Java Developers for Java App Development and IT Outsourci...
Mobisoft Infotech
 
Why Landlords Trust Rent On Time for Stress-Free Property Management
Why Landlords Trust Rent On Time for Stress-Free Property ManagementWhy Landlords Trust Rent On Time for Stress-Free Property Management
Why Landlords Trust Rent On Time for Stress-Free Property Management
Rent On Time
 
What is Interior designing(introduction).pdf
What is Interior designing(introduction).pdfWhat is Interior designing(introduction).pdf
What is Interior designing(introduction).pdf
bhatiagitali
 
Oleksandr Osypenko: Професійна етика та відповідальність (UA)
Oleksandr Osypenko: Професійна етика та відповідальність (UA)Oleksandr Osypenko: Професійна етика та відповідальність (UA)
Oleksandr Osypenko: Професійна етика та відповідальність (UA)
Lviv Startup Club
 
chapter 9 leadership qualityies university of windsor
chapter 9 leadership qualityies university of windsorchapter 9 leadership qualityies university of windsor
chapter 9 leadership qualityies university of windsor
zamananalyst29
 
Daniel E. Kaplan - Dedication To Financial Excellence
Daniel E. Kaplan - Dedication To Financial ExcellenceDaniel E. Kaplan - Dedication To Financial Excellence
Daniel E. Kaplan - Dedication To Financial Excellence
Daniel E. Kaplan
 
Water Pump Market Size, Share and Forecast | 2025-2034
Water Pump Market Size, Share and Forecast | 2025-2034Water Pump Market Size, Share and Forecast | 2025-2034
Water Pump Market Size, Share and Forecast | 2025-2034
GeorgeButtler
 
Enterprise Design templates (free PowerPoint templates)
Enterprise Design templates (free PowerPoint templates)Enterprise Design templates (free PowerPoint templates)
Enterprise Design templates (free PowerPoint templates)
Eero Hosiaisluoma
 
Dr. Enrique Segura Ense Group - A Collector Of Italian Cars.pdf
Dr. Enrique Segura Ense Group - A Collector Of Italian Cars.pdfDr. Enrique Segura Ense Group - A Collector Of Italian Cars.pdf
Dr. Enrique Segura Ense Group - A Collector Of Italian Cars.pdf
Dr. Enrique Segura Ense Group
 
Extending Infrastructure Life with Protective Coatings
Extending Infrastructure Life with Protective CoatingsExtending Infrastructure Life with Protective Coatings
Extending Infrastructure Life with Protective Coatings
rahil wit
 
The Essential Guide to Using Weed Mats Effectively.pdf
The Essential Guide to Using Weed Mats Effectively.pdfThe Essential Guide to Using Weed Mats Effectively.pdf
The Essential Guide to Using Weed Mats Effectively.pdf
dmktg41singhal
 
HVAC Filter Test .pdf
HVAC Filter Test                    .pdfHVAC Filter Test                    .pdf
HVAC Filter Test .pdf
Test Master
 
000000000000000000000000000000000001.pdf
000000000000000000000000000000000001.pdf000000000000000000000000000000000001.pdf
000000000000000000000000000000000001.pdf
hashimsaidiseki99
 
Transforming Your Business with As-Is and To-Be Process Analysis
Transforming Your Business with As-Is and To-Be Process AnalysisTransforming Your Business with As-Is and To-Be Process Analysis
Transforming Your Business with As-Is and To-Be Process Analysis
RUPAL AGARWAL
 
Commercial Banks Management Unit-2 Risks Faced by Commercial Banks.pptx
Commercial Banks Management Unit-2 Risks Faced by Commercial Banks.pptxCommercial Banks Management Unit-2 Risks Faced by Commercial Banks.pptx
Commercial Banks Management Unit-2 Risks Faced by Commercial Banks.pptx
aachalmagar86
 
Enhancing MLM Platforms Through Advanced Communication Tools
Enhancing MLM Platforms Through Advanced Communication ToolsEnhancing MLM Platforms Through Advanced Communication Tools
Enhancing MLM Platforms Through Advanced Communication Tools
Epixel MLM Software
 
DIGIPIN : The new Digital Address system in India - How It can Help Pharma In...
DIGIPIN : The new Digital Address system in India - How It can Help Pharma In...DIGIPIN : The new Digital Address system in India - How It can Help Pharma In...
DIGIPIN : The new Digital Address system in India - How It can Help Pharma In...
Satya Mahesh Kallakuru
 
Thermal Energy Investor slide deck - June 2025
Thermal Energy Investor slide deck - June 2025Thermal Energy Investor slide deck - June 2025
Thermal Energy Investor slide deck - June 2025
Marketing847413
 
MNC - Simpatico PR B2B PR agency case study 0625.pdf
MNC - Simpatico PR B2B PR agency case study 0625.pdfMNC - Simpatico PR B2B PR agency case study 0625.pdf
MNC - Simpatico PR B2B PR agency case study 0625.pdf
Simpatico PR
 
Eco Packing experts Australia Catalogues
Eco Packing experts Australia CataloguesEco Packing experts Australia Catalogues
Eco Packing experts Australia Catalogues
Samsmith644393
 
How to Quickly Hire Java Developers for Java App Development and IT Outsourci...
How to Quickly Hire Java Developers for Java App Development and IT Outsourci...How to Quickly Hire Java Developers for Java App Development and IT Outsourci...
How to Quickly Hire Java Developers for Java App Development and IT Outsourci...
Mobisoft Infotech
 
Why Landlords Trust Rent On Time for Stress-Free Property Management
Why Landlords Trust Rent On Time for Stress-Free Property ManagementWhy Landlords Trust Rent On Time for Stress-Free Property Management
Why Landlords Trust Rent On Time for Stress-Free Property Management
Rent On Time
 
What is Interior designing(introduction).pdf
What is Interior designing(introduction).pdfWhat is Interior designing(introduction).pdf
What is Interior designing(introduction).pdf
bhatiagitali
 
Oleksandr Osypenko: Професійна етика та відповідальність (UA)
Oleksandr Osypenko: Професійна етика та відповідальність (UA)Oleksandr Osypenko: Професійна етика та відповідальність (UA)
Oleksandr Osypenko: Професійна етика та відповідальність (UA)
Lviv Startup Club
 
chapter 9 leadership qualityies university of windsor
chapter 9 leadership qualityies university of windsorchapter 9 leadership qualityies university of windsor
chapter 9 leadership qualityies university of windsor
zamananalyst29
 
Daniel E. Kaplan - Dedication To Financial Excellence
Daniel E. Kaplan - Dedication To Financial ExcellenceDaniel E. Kaplan - Dedication To Financial Excellence
Daniel E. Kaplan - Dedication To Financial Excellence
Daniel E. Kaplan
 
Water Pump Market Size, Share and Forecast | 2025-2034
Water Pump Market Size, Share and Forecast | 2025-2034Water Pump Market Size, Share and Forecast | 2025-2034
Water Pump Market Size, Share and Forecast | 2025-2034
GeorgeButtler
 
Enterprise Design templates (free PowerPoint templates)
Enterprise Design templates (free PowerPoint templates)Enterprise Design templates (free PowerPoint templates)
Enterprise Design templates (free PowerPoint templates)
Eero Hosiaisluoma
 
Dr. Enrique Segura Ense Group - A Collector Of Italian Cars.pdf
Dr. Enrique Segura Ense Group - A Collector Of Italian Cars.pdfDr. Enrique Segura Ense Group - A Collector Of Italian Cars.pdf
Dr. Enrique Segura Ense Group - A Collector Of Italian Cars.pdf
Dr. Enrique Segura Ense Group
 
Extending Infrastructure Life with Protective Coatings
Extending Infrastructure Life with Protective CoatingsExtending Infrastructure Life with Protective Coatings
Extending Infrastructure Life with Protective Coatings
rahil wit
 
The Essential Guide to Using Weed Mats Effectively.pdf
The Essential Guide to Using Weed Mats Effectively.pdfThe Essential Guide to Using Weed Mats Effectively.pdf
The Essential Guide to Using Weed Mats Effectively.pdf
dmktg41singhal
 
HVAC Filter Test .pdf
HVAC Filter Test                    .pdfHVAC Filter Test                    .pdf
HVAC Filter Test .pdf
Test Master
 
000000000000000000000000000000000001.pdf
000000000000000000000000000000000001.pdf000000000000000000000000000000000001.pdf
000000000000000000000000000000000001.pdf
hashimsaidiseki99
 
Transforming Your Business with As-Is and To-Be Process Analysis
Transforming Your Business with As-Is and To-Be Process AnalysisTransforming Your Business with As-Is and To-Be Process Analysis
Transforming Your Business with As-Is and To-Be Process Analysis
RUPAL AGARWAL
 

Transactional File System In Java - Commons Transaction

  • 1. Transactional File System in Java – commons transaction Albert Guo [email_address]
  • 2. Agenda CMCS Scenario Commons Transaction Commons Transaction Implementation Conclusion
  • 4. System Architecture CIS Green Windchill Project Management Document Management Change Management Pro/E Wildfire Pro/E Work Space Pro/E PDMLink Supplier Management GSM Product Management (Part /BOM) Interface Table SAP ERP ProjectLink ODBC xmls, files
  • 8. What is Commons Transaction Whenever you have concurrent access to resources and want to protect them with locks, Commons Transaction can be right for you. Providing lightweight, standardized, well tested and efficient implementations of utility classes commonly used in transactional Java programming. The 1.x component is compatible to JDK1.2 .
  • 9. Commons Transaction Features Commons Transaction might be useful for you when you need transactional file access (i.e. ACID transactions on a set of files) have resources that need locking - lock managers can do that for you: be sure you never forget to release a lock again let your code have a timer for a whole block of locks have an out-of-the-box solution for hierarchical locks plug in your own custom or advanced solutions
  • 13. 2. Initialize FileResourceManager storeDir String - JavaDoc says: "directory where main data should go after commit". workDir String - JavaDoc says: directory where transactions store temporary data. next parameter is a boolean that indicates if the path should be URL encoded. In our example it is false, indicating that we have simple path with no spaces or i18n characters in it. sLogger LoggerFacade - JavaDoc says: the logger to be used by this store.
  • 14. 3. Start FileResourceManager & Start Transaction
  • 15. 4. Modify Resources With the transaction started, you can begin file manipulation. You can perform following operations: copyResource createResource deleteResource moveResource writeResource In our example, we’ll demo createResource and writeResource
  • 19. Conclusion If you have to operate on files and cannot afford to loose data, seriously consider using commons-transactions package. It is probably better then any custom mechanism you can come up with. It supports 2 phase commit. With a little work, you could probably make it into an XA compliant resource.