Verifying offchain computations using TrueBit. Sami MakelaCyber Fund
This topic was presented on the Blockchain FairyTales Conference in Minsk, that was held by cyber•Fund
Additional information about the company cyber•Fund
We are investing and developing blockchain projects which can fundamentally change the world we live in for the better. We are creating an economy of robots and people's self-expression. More about our work you can learn from the following resources:
Our projects:
cyber•Fund - analytics and development of blockchain systems
Golos.io - media blockchain platform
Satoshi•Fund - the first fund investing in crypto assets
Cyberstudio.io - assistance in conducting ICO
We are waiting for you in our communities:
Blog:
https://blog.cyber.fund/
Email Newsletter:
http://company.cyber.fund/#newsletter
Social networks:
https://golos.io/@cyberfund
https://steemit.com/@cyberfund
https://twitter.com/cyberfundio
https://www.reddit.com/r/cyber_Fund/
https://www.facebook.com/cyberfund - the official page of cyber•Fund
https://www.facebook.com/blockchainmeetups/ - the official page of cyber•Events (Blockchain meetups, conferences, reports)
https://www.slideshare.net/CyberFund-Official
For developers:
https://t.me/CyberFundDev - telegram chat for blockchain developers
https://github.com/cyberFund - our repository on Github with open source software
https://github.com/cyberFund/Library - library of knowledge on the blockchain
Verifying offchain computations using TrueBit. Sami MakelaCyber Fund
This topic was presented on the Blockchain FairyTales Conference in Minsk, that was held by cyber•Fund
Additional information about the company cyber•Fund
We are investing and developing blockchain projects which can fundamentally change the world we live in for the better. We are creating an economy of robots and people's self-expression. More about our work you can learn from the following resources:
Our projects:
cyber•Fund - analytics and development of blockchain systems
Golos.io - media blockchain platform
Satoshi•Fund - the first fund investing in crypto assets
Cyberstudio.io - assistance in conducting ICO
We are waiting for you in our communities:
Blog:
https://blog.cyber.fund/
Email Newsletter:
http://company.cyber.fund/#newsletter
Social networks:
https://golos.io/@cyberfund
https://steemit.com/@cyberfund
https://twitter.com/cyberfundio
https://www.reddit.com/r/cyber_Fund/
https://www.facebook.com/cyberfund - the official page of cyber•Fund
https://www.facebook.com/blockchainmeetups/ - the official page of cyber•Events (Blockchain meetups, conferences, reports)
https://www.slideshare.net/CyberFund-Official
For developers:
https://t.me/CyberFundDev - telegram chat for blockchain developers
https://github.com/cyberFund - our repository on Github with open source software
https://github.com/cyberFund/Library - library of knowledge on the blockchain
Design and Implementation of the Security Graph LanguageAsankhaya Sharma
Today software is built in fundamentally different
ways from how it was a decade ago. It is increasingly common
for applications to be assembled out of open-source components,
resulting in the use of large amounts of third-party code. This
third-party code is a means for vulnerabilities to make their
way downstream into applications. Recent vulnerabilities such
as Heartbleed, FREAK SSL/TLS, GHOST, and the Equifax data
breach (due to a flaw in Apache Struts) were ultimately caused
by third-party components. We argue that an automated way to
audit the open-source ecosystem, catalog existing vulnerabilities,
and discover new flaws is essential to using open-source safely.
To this end, we describe the Security Graph Language (SGL), a
domain-specific language for analysing graph-structured datasets
of open-source code and cataloguing vulnerabilities. SGL allows
users to express complex queries on relations between libraries
and vulnerabilities in the style of a program analysis language.
SGL queries double as an executable representation for vulnerabilities, allowing vulnerabilities to be automatically checked
against a database and deduplicated using a canonical representation. We outline a novel optimisation for SGL queries based on
regular path query containment, improving query performance up to 3 orders of magnitude. We also demonstrate the
effectiveness of SGL in practice to find zero-day vulnerabilities
by identifying sever
Logitoring - log-driven monitoring and the Rocket scienceEDS Systems
Talking about a common way of delivering, storing and analyzing monitoring/log/trace data flows.
Do the data in monitoring have the same
nature as data in logging?
Design and Implementation of the Security Graph LanguageAsankhaya Sharma
Today software is built in fundamentally different
ways from how it was a decade ago. It is increasingly common
for applications to be assembled out of open-source components,
resulting in the use of large amounts of third-party code. This
third-party code is a means for vulnerabilities to make their
way downstream into applications. Recent vulnerabilities such
as Heartbleed, FREAK SSL/TLS, GHOST, and the Equifax data
breach (due to a flaw in Apache Struts) were ultimately caused
by third-party components. We argue that an automated way to
audit the open-source ecosystem, catalog existing vulnerabilities,
and discover new flaws is essential to using open-source safely.
To this end, we describe the Security Graph Language (SGL), a
domain-specific language for analysing graph-structured datasets
of open-source code and cataloguing vulnerabilities. SGL allows
users to express complex queries on relations between libraries
and vulnerabilities in the style of a program analysis language.
SGL queries double as an executable representation for vulnerabilities, allowing vulnerabilities to be automatically checked
against a database and deduplicated using a canonical representation. We outline a novel optimisation for SGL queries based on
regular path query containment, improving query performance up to 3 orders of magnitude. We also demonstrate the
effectiveness of SGL in practice to find zero-day vulnerabilities
by identifying sever
Logitoring - log-driven monitoring and the Rocket scienceEDS Systems
Talking about a common way of delivering, storing and analyzing monitoring/log/trace data flows.
Do the data in monitoring have the same
nature as data in logging?
Java/Scala Lab 2016. Дмитрий Соколов: Принципы работы с транзакциями при помо...GeeksLab Odessa
16.4.16 Java/Scala Lab
Upcoming events: goo.gl/I2gJ4H
- внутренее устройство Spring JTA, возможные конфигурации с Spring AOP
- все возможности фреймворка по работе с транзакциями
- виды источников транзакций и как с ними работать
- распределенные транзакции с несколькими источниками данных
- интеграция с Spring JdbcTemplate, Hibernate, JMS.
An autonomous transaction has its own COMMIT and ROLLBACK scope to ensure that its outcome does not effect the caller’s uncommitted changes. Additionally, the COMMITs and ROLLBACK in the calling transaction should not effect the changes that were finalized on the completion of autonomous transaction itself.
Transaction processing is very important and also necessary to maintain data integrity in both your application and database.
The transaction design patterns that are described in the next are :
Client Owner Transaction Design Pattern
Domain Service Owner Transaction Design Pattern
Server Delegate Owner Transaction Design Pattern
Transaction management in Java does not have to be complicated using the transaction design patterns described in this chapter makes transaction processing easy to understand, implement, and maintain.
'Effective node.js development' by Viktor Turskyi at OdessaJS'2020OdessaJS Conf
How to develop NodeJS apps effectively? I will tell you all details and share his personal experience on the whole process: from the very start and up to the production stage.
You will also learn more about Docker, SDLC and 12 Factor App. Save the date!
[Java eeconf 2016] spring jta principles of work with transactions. Dmytro S...Dmytro Sokolov
cover following topics:
the internal structure of Spring JTA;
possible configuration with Spring AOP;
all features of the framework for handling transactions;
the types of sources of transactions and how to work with them;
distributed transactions with multiple data sources;
integration with Spring JdbcTemplate, Hibernate, JMS.
Viktor Turskyi "Effective NodeJS Application Development"Fwdays
For 15 years in development, I managed to take part in the creation of a large number of various projects. I have already made a number of talks on the working architecture of Web applications, but this is only part of the efficient development puzzle. We will consider the whole process from the start of the project to its launch in production. I’ll tell you how we approach the ideas of the “12 Factor App”, how we use the docker, discuss environment deployment issues, security issues, testing issues, discuss the nuances of SDLC and much more.
MongoDB WiredTiger Internals: Journey To TransactionsMydbops
MongoDB has adapted transaction feature (ACID Properties) in MongoDB 4.0. This talk focuses on the internals of how MongoDB adapted the ACID properties with Weird Tiger Engine. Weird tiger offers more future possibilities for MongoDB. This tech talk was presented at Mydbops Database Meetup on 27-04-2019 by Manosh Malai Senior Devops/NoSQL Consultant with Mydbops and Ranjith Database Administrator with Mydbops.
MongoDB WiredTiger Internals: Journey To TransactionsM Malai
MongoDB has adapted transaction feature in MongoDB 4.0. This talk focuses on the internals of how MongoDB adapted the ACID properties with Weird Tiger Engine. Weird tiger offers more future possibilities for MongoDB.
+ What is domain logic?
+ Domain logic patterns:
* Transaction script
* Domain model
* Table module
* Service layer
+ Conclusion
by Pavlo Livchak, Software Engineer at ElifTech
Monitoring Kubernetes with Prometheus (Kubernetes Ireland, 2016)Brian Brazil
Prometheus is a next-generation monitoring system. Since being publicly announced last year it has seen wide-spread interest and adoption. This talk will look at the concepts behind monitoring with Prometheus, and how to use it with Kubernetes which has direct support for Prometheus.
Faridabad MuleSoft Meetup 05 March 2022 - Transaction Management in MuleSoft
Event link: https://meetups.mulesoft.com/events/d...
Agenda:
What is Transaction and how to Manage in MuleSoft:
Transaction Types:
Transactional Actions and C
GE IOT Predix Time Series & Data Ingestion Service using Apache Apex (Hadoop)Apache Apex
This presentation will introduce usage of Apache Apex for Time Series & Data Ingestion Service by General Electric Internet of things Predix platform. Apache Apex is a native Hadoop data in motion platform that is being used by customers for both streaming as well as batch processing. Common use cases include ingestion into Hadoop, streaming analytics, ETL, database off-loads, alerts and monitoring, machine model scoring, etc.
Abstract: Predix is an General Electric platform for Internet of Things. It helps users develop applications that connect industrial machines with people through data and analytics for better business outcomes. Predix offers a catalog of services that provide core capabilities required by industrial internet applications. We will deep dive into Predix Time Series and Data Ingestion services leveraging fast, scalable, highly performant, and fault tolerant capabilities of Apache Apex.
Speakers:
- Venkatesh Sivasubramanian, Sr Staff Software Engineer, GE Predix & Committer of Apache Apex
- Pramod Immaneni, PPMC member of Apache Apex, and DataTorrent Architect
Transaction is a unit of program execution that accesses and possibly updates various data items.
Usually, a transaction is initiated by a user program written in a high-level data-manipulation language or programming language (for example, SQL,COBOL, C, C++, or Java), where it is delimited by statements (or function calls) of the form begin transaction and end transaction.
Similar to Distributed Transaction Management in Spring & JEE (20)
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Shahin Sheidaei
Games are powerful teaching tools, fostering hands-on engagement and fun. But they require careful consideration to succeed. Join me to explore factors in running and selecting games, ensuring they serve as effective teaching tools. Learn to maintain focus on learning objectives while playing, and how to measure the ROI of gaming in education. Discover strategies for pitching gaming to leadership. This session offers insights, tips, and examples for coaches, team leads, and enterprise leaders seeking to teach from simple to complex concepts.
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
Code reviews are vital for ensuring good code quality. They serve as one of our last lines of defense against bugs and subpar code reaching production.
Yet, they often turn into annoying tasks riddled with frustration, hostility, unclear feedback and lack of standards. How can we improve this crucial process?
In this session we will cover:
- The Art of Effective Code Reviews
- Streamlining the Review Process
- Elevating Reviews with Automated Tools
By the end of this presentation, you'll have the knowledge on how to organize and improve your code review proces
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
How to Position Your Globus Data Portal for Success Ten Good PracticesGlobus
Science gateways allow science and engineering communities to access shared data, software, computing services, and instruments. Science gateways have gained a lot of traction in the last twenty years, as evidenced by projects such as the Science Gateways Community Institute (SGCI) and the Center of Excellence on Science Gateways (SGX3) in the US, The Australian Research Data Commons (ARDC) and its platforms in Australia, and the projects around Virtual Research Environments in Europe. A few mature frameworks have evolved with their different strengths and foci and have been taken up by a larger community such as the Globus Data Portal, Hubzero, Tapis, and Galaxy. However, even when gateways are built on successful frameworks, they continue to face the challenges of ongoing maintenance costs and how to meet the ever-expanding needs of the community they serve with enhanced features. It is not uncommon that gateways with compelling use cases are nonetheless unable to get past the prototype phase and become a full production service, or if they do, they don't survive more than a couple of years. While there is no guaranteed pathway to success, it seems likely that for any gateway there is a need for a strong community and/or solid funding streams to create and sustain its success. With over twenty years of examples to draw from, this presentation goes into detail for ten factors common to successful and enduring gateways that effectively serve as best practices for any new or developing gateway.
How Recreation Management Software Can Streamline Your Operations.pptxwottaspaceseo
Recreation management software streamlines operations by automating key tasks such as scheduling, registration, and payment processing, reducing manual workload and errors. It provides centralized management of facilities, classes, and events, ensuring efficient resource allocation and facility usage. The software offers user-friendly online portals for easy access to bookings and program information, enhancing customer experience. Real-time reporting and data analytics deliver insights into attendance and preferences, aiding in strategic decision-making. Additionally, effective communication tools keep participants and staff informed with timely updates. Overall, recreation management software enhances efficiency, improves service delivery, and boosts customer satisfaction.
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
Keep tabs on your field staff effortlessly with Informap Technology Centre LLC. Real-time tracking, task assignment, and smart features for efficient management. Request a live demo today!
For more details, visit us : https://informapuae.com/field-staff-tracking/
2. Transaction 101
● Need to perform multiple operations on a datasource for a particular
client action
● Need to make this action atomic
○ All or None
● Well... it cannot be that difficult
○ Obtain a connection
○ Start a transaction
○ Do your DB work
○ Commit the changes
2
4. Transactions In The Grand Scheme
● Most of the functional real life application usually involves various
components (DBs, Message Brokers, IMDGs, EJBs etc.) *usually* running
in different machines and connected through a network
● We often need to make transactional operations involving multiple
resources
● The simple Local Transaction model doesn’t suffice anymore
● The necessity for something that can talk to and monitor all the resources
and perform transactions across all (e.g. Global Transaction management)
4
5. Hola Distributed Transaction Processing (DTP)
● Distributed Transaction accesses or modifies data stored in multiple
datasources
● A global Transaction Manager (TM) governs whether to commit or rollback
changes made in a distributed transaction
● A good application server should have this functionality out of the box
● But we have various application servers (WebLogic, WildFly, GlassFish)
running numerous applications each one having different transactional
needs and each one talking to their own data sources
● There has to be an open general specification to coordinate between a
TM and other involved components
5
6. X/Open XA Standard
● Specification to facilitate Distributed Transaction Processing (DTP) across
heterogenous components
● Guarantees Atomicity of a transaction among multiple components
using a 2-Phase Commit (2PC) protocol
● Describes the interface between a global transaction manager, data
sources and applications
● The Global Transaction Manager tracks the participants in the transaction
(i.e. XAResources), and works with them to carry out 2PC. XA TM is
separate from an application's interactions with servers. It maintains a log
of its decisions to commit or roll back, which it can use to recover in case
of a system outage.
6
8. Java Transaction API (JTA)
● Java Transaction API (JTA) is modelled on top of Open XA spec
● JTA Specifies standard Java interfaces between a transaction manager and
the parties involved in a distributed transaction system such as:
● Resource manager
○ Should implement javax.transaction.xa.XAResource for it to participate in a
distributed transaction
● Application server
○ Should implement javax.transaction.TransactionManager to manage
transactions on behalf of the application
● Transactional applications
○ Should implement javax.transaction.UserTransaction to specify transaction
boundaries of an action 8
10. WebLogic Transaction Manager
● WebLogic application server provides DTP out of the box
● XA Resources willing to be managed by WL TM need to register
themselves to be managed during the server bootstrapping process
● TM then coordinates the transactions among the resources using 2PC
protocol of XA
● Provides monitoring tools to keep track of the health of transactional
resources
● Provides interface to tweak different transaction configurations
● Individual transactions can be monitored using OEM
10
12. Transaction Boundary Demarcation
● Let’s re-iterate a little
○ Three JTA interfaces for DTP
■ XA Resources ✅
■ Transaction Manager ✅
■ Application Programs
● Application programs only need to mark transaction boundaries
● Boundary of a transaction can be set both:
○ Programmatically
○ Declaratively
12
13. Programmatic Transaction Management
● AKA Bean Managed Transaction
● You need to write manual code to demarcate the boundaries of
transaction
● Very little usage in Therap (e.g. backend-test)
● EJB
○ Application code can begin and end transaction through the
javax.transaction.UserTransaction interface
● Spring
○ Recommends using
org.springframework.transaction.support.TransactionTemplate
for programmatic transaction demarcation
13
14. Declarative Transaction Management
● AKA Container Managed Transaction (CMT)
● Convention over Configuration (yay! even less work for programmers)
● EJB
○ CMT in EJB environment is strictly tied to JTA
○ All Session Beans and MDBs may use CMT
○ Delegates the responsibility of starting and committing of a transaction
○ Can set transaction attributes using @TransactionAttribute annotation
○ Rollback occurs for any system exception (RTE) and not app exception
(checked exceptions)
● Spring
○ Need to configure DTM in context configuration
○ Need to set transaction boundaries and attributes using @Transactional
annotation in class and/or method level
14
15. Configure Declarative Transaction in Spring
<tx:jta-transaction-manager/>
Creates a default JtaTransactionManager bean with name "transactionManager",
matching the default bean name expected by <tx:annotation-driven/>.
Automatically detects WebLogic, WebSphere and OC4J: creating a
WebLogicJtaTransactionManager, WebSphereUowTransactionManager or
OC4JJtaTransactionManager, respectively.
<tx:annotation-driven/>
Indicates that transaction configuration is defined by annotations on bean classes, and
that proxies are automatically to be created for the relevant annotated beans.
15
16. Understanding @Transactional
● Marks scope of ongoing transaction and enabled by AOP proxies
● The combination of AOP with transactional metadata yields an AOP
proxy that uses a TransactionInterceptor in conjunction with an
appropriate PlatformTransactionManager implementation to drive
transactions around method invocations
N.B. Proxy is default mode but AspectJ is also an option
16
17. @Transactional Properties
The @Transactional annotation is metadata that specifies that an interface, class, or
method must have transactional semantics; for example, "start a brand new read-only
transaction when this method is invoked, suspending any existing transaction". The
default @Transactional settings are as follows:
● Propagation setting is PROPAGATION_REQUIRED
● Isolation level is ISOLATION_DEFAULT
● Transaction is read/write
● Transaction timeout defaults to the default timeout of the underlying transaction
system, or to none if timeouts are not supported
● Any RuntimeException triggers rollback, and any checked Exception does not
17
18. Did I Say Proxy?
● Classic structural design pattern
● A proxy acts as a substitute for a real service object used by a client and can
weave additional work (cross-cutting concerns) around the target service
○ Transaction Demarcation
○ Access Control
○ Caching etc.
● Spring AOP modes
○ Proxy (Runtime weaving)
○ AspectJ (Compile/Load-time weaving)
● Our choice: Proxy
○ Easier to configure
○ Less load-time overhead
18
21. @Transactional Documentation
When using proxies, you should apply the @Transactional annotation only to methods with public visibility. If you do
annotate protected, private or package-visible methods with the @Transactional annotation, no error is raised, but the
annotated method does not exhibit the configured transactional settings. Consider the use of AspectJ (see below) if you
need to annotate non-public methods.
...
Spring recommends that you only annotate concrete classes (and methods of concrete classes) with the @Transactional
annotation, as opposed to annotating interfaces. You certainly can place the @Transactional annotation on an interface
(or an interface method), but this works only as you would expect it to if you are using interface-based proxies. The fact that
Java annotations are not inherited from interfaces means that if you are using class-based proxies ( proxy-target-
class="true") or the weaving-based aspect ( mode="aspectj"), then the transaction settings are not recognized by the
proxying and weaving infrastructure, and the object will not be wrapped in a transactional proxy, which would be decidedly
bad.
21
22. More from Doc
In proxy mode (which is the default), only external
method calls coming in through the proxy are
intercepted. This means that self-invocation, in effect, a
method within the target object calling another method
of the target object, will not lead to an actual transaction
at runtime even if the invoked method is marked with
@Transactional. Also, the proxy must be fully
initialized to provide the expected behaviour so you
should not rely on this feature in your initialization code,
i.e. @PostConstruct.
public class NotSoGreatService {
public void doSomething() {
// code
supposedToDoSomethingInTx();
}
@Transactional
public void supposedToDoSomethingInTx() {
// transactional code
}
} 22
23. @Transactional TL;DR
● In Proxy Mode
○ @Transactional on concrete class and public methods of concrete class
○ Methods are only intercepted through proxy for external calls so no self-
invocation
○ Proxy must be fully initialized before the expected functionality to work so no
usage inside constructor or bean construction callbacks (e.g.
@PostConstruct)
● In AspectJ Mode
○ “Reality can be anything I want.” - Thanos (Avengers: Infinity War)
23
24. How’d I Know If It’s Working?
● Don’t get fooled by the
simplicity of Declarative TM
● If you mess up demarcation, no
error is raised in runtime
● Verify, don’t just rely!
24
25. Step #1: Enable Logs
● Enable debug log for org.springframework.transaction and
additionally for org.springframework.orm.jpa in logback.xml
● First one is not mandatory to trace transactions but helps to relate with
EntityManager sessions
<logger name="org.springframework.orm.jpa" level="debug"/>
<logger name="org.springframework.transaction" level="debug"/>
25
27. To Learn More
● Official Spring Documentation on Transaction Management
https://docs.spring.io/spring-framework/docs/4.2.x/spring-framework-
reference/html/transaction.html
● Java EE 7 Tutorial: Transactions
https://docs.oracle.com/javaee/7/tutorial/transactions.htm
● Fusion Middleware Programming JTA for Oracle WebLogic Server
https://docs.oracle.com/cd/E24329_01/web.1211/e24377/gstrx.htm#WLJTA11
5
27