Slide from presentation titles Concurrency in Eclipse: Best Practices and Gotchas by Andrew McCulloch and Carlin Rogers at EclipseCon 2011 in Santa Clara, CA.
My recommendations and experiences of using React.js for a 10 months in HolidayCheck. I've jumped into the Hype Train being pretty surprised about the outcome of this technology discovery.
Slides were presented during React vs Angular meetup in Poznan, Poland. I've placed some Angular logos to make its developers comfortable with react.
utPLSQL offers a unit testing API for PL/SQL that is modeled on the xUnit approach. This is an old slide deck on utPLSQL so my apologies for any inconsistencies with the current utility. Note: while I created the original utPLSQL code base, I am not actively working on utPLSQL at this time. Check out github.com/utplsql for the code and project details.
Selenium being one of the best automation testing tool for web apps, is used by almost every company and these companies don’t seem to stop hiring for testing job roles. Here are a few questions to get your preparation started to crack your next interview in automation testing.
Spring Certification Questions and Spring Free test are tests created to demonstrate all the functions of our mock exams. You will be able to access ten full questions and will have ten minutes of time for finishing the test.
There are several components you can interact with when you take our mock exams:
Take a look at the progress bar at the top; it will tell how you are progressing through the exam.
Read the question and select only the answers you think are correct by checking the corresponding check box.
Navigate the spring questions using the "Previous" and "Next" buttons.
Mark the spring questions you wish to review later. All the questions you have marked will be listed on the right in the section "marked questions". You will be able to jump directly to the question from this list.
If you want to take a look at the correct answers for a question, just click the "Solution" button. In the solution section you will be able to check your answers as well as find a full explanation of the question.
Keep an eye on the countdown. This will tell you how much time is remaining. When the countdown expires, the test will be automatically submitted.
Once the test is submitted, the "result" section will expand. Here, you will be able to review all the questions of the test. From here, you can also navigate directly to each question.
My recommendations and experiences of using React.js for a 10 months in HolidayCheck. I've jumped into the Hype Train being pretty surprised about the outcome of this technology discovery.
Slides were presented during React vs Angular meetup in Poznan, Poland. I've placed some Angular logos to make its developers comfortable with react.
utPLSQL offers a unit testing API for PL/SQL that is modeled on the xUnit approach. This is an old slide deck on utPLSQL so my apologies for any inconsistencies with the current utility. Note: while I created the original utPLSQL code base, I am not actively working on utPLSQL at this time. Check out github.com/utplsql for the code and project details.
Selenium being one of the best automation testing tool for web apps, is used by almost every company and these companies don’t seem to stop hiring for testing job roles. Here are a few questions to get your preparation started to crack your next interview in automation testing.
Spring Certification Questions and Spring Free test are tests created to demonstrate all the functions of our mock exams. You will be able to access ten full questions and will have ten minutes of time for finishing the test.
There are several components you can interact with when you take our mock exams:
Take a look at the progress bar at the top; it will tell how you are progressing through the exam.
Read the question and select only the answers you think are correct by checking the corresponding check box.
Navigate the spring questions using the "Previous" and "Next" buttons.
Mark the spring questions you wish to review later. All the questions you have marked will be listed on the right in the section "marked questions". You will be able to jump directly to the question from this list.
If you want to take a look at the correct answers for a question, just click the "Solution" button. In the solution section you will be able to check your answers as well as find a full explanation of the question.
Keep an eye on the countdown. This will tell you how much time is remaining. When the countdown expires, the test will be automatically submitted.
Once the test is submitted, the "result" section will expand. Here, you will be able to review all the questions of the test. From here, you can also navigate directly to each question.
FAQ - why does my code throw a null pointer exception - common reason #1 Rede...Alan Richardson
A common reason for Null Pointer Exceptions in Java is a variable redeclaration instead of instantiation. Learn what that means, how to avoid it, and how to spot it, in this presentation.
Read the full blog post: http://testerhq.com/post/blogs/javafortesters/2017-08-29-faq-null-pointer-exception/
Visit my Java Web Site: http://javafortesters.com
---
# FAQ - why does my code throw a null pointer exception - common reason #1 Redeclaration
- Using `@BeforeClass` or `@Before` can setup data for use in tests
- Any 'variables' we instantiate need to be 'fields' rather than variables
- We want to instantiate them in the setup method rather than redeclare them
---
# Example of the Problem
I know I will use an `Adder` in my test so I create it as a field:
~~~~~~~~
public class WhyCodeThrowsNullPointerExceptionTest {
Adder adder;
~~~~~~~~
I don't want to re-instantiate it each time so I make an `@BeforeClass` method to instantiate it:
~~~~~~~~
@BeforeClass
public static void setupAdder(){
Adder adder = new Adder();
}
~~~~~~~~
**Warning: Error in the above code**
---
# Semantic Error
I just made a Semantic coding error. This won't be caught by a compiler, but it will cause my `@Test` to fail with a Null Pointer Exception.
In the setup method I really wanted to assign a value to the field, instead I created an new variable with the same name.
# In General
- Try to write one test at a time so that if you have a problem it is easier to identify where the problem is
- Try to write working isolated tests and then refactor to a more general solution when you need it - that way, you know it was working, so you just have to work backwards to find out what went wrong
- Try to use automated IDE refactoring rather than move code around manually
- Use the IDE syntax highlighting to help spot any issues
Have you ever thought how is it to work with ReactJS for a long time? I do. The talk is taking you through the life of the stack at HolidayCheck, lessons learned and other experiences.
Unit testing helps improving the quality of your code and greatly simplifies dealing with complex code. The testing framework of choice for React.js is Jest.
React keeps on evolving and making hard things easier for the average developer.
One case, where React was not particularly hard but very repetitive, is working with AJAX request. There is always the trinity of loading, success and possible error states that had to be handled each time. But no more as the <Suspense /> component makes life much easier.
Another case is performance of larger and complex applications. Usually React is fast enough but with a large application rendering components can conflict with user interactions. Concurrent rendering will, mostly automatically, take care of this.
You will learn all about using , showing loading indicators and handling errors. You will see how easy it is to get started with concurrent rendering. You will make suspense even more capable by combining it with concurrent rendering, the useTransition() hook and the component.
An Automation QA resume with 3 Years and 10 months of industry experience in the area of Software Testing (Automation) with a solid understanding and work experience in Web, Mobile, Desktop and API application testing domain
Struts has outgrown its reputation as a simple web framework and has become more of a brand. Because of this, two next generation frameworks are being developed within the project: Shale and Action 2.0. Action 2.0 is based on WebWork, and though its backing beans are similar to JSF, its architecture is much simpler, and easier to use.
Migrating to Struts Action 2.0 is more about unlearning Struts than it is about learning the "WebWork Way". Once you understand how simple WebWork is, you'll find that Struts Action 2.0 is a powerful framework that supports action-based navigation, page-based navigation, AOP/Interceptors, components and rich Ajax support.
Come to this session to see code comparisons and learn about migration strategies to use the kick-ass web framework of 2006.
A talk about unit testing for iOS apps. Part rambling introduction to test driven development, part examples of certain types of tests for iOS, and a brief mention of writing your tests using Kiwi.
The current state of the Apache Wicket framework in 2014 as presented at the DEVdev meetup held in Deventer, the Netherlands.
- A critique of ThoughtWorks' Technology Review 2014 where they slam JSF (jay) as a concept (nay)
- A look back at 10 years of Wicket
- A review of the current Wicket versions
- An outlook and roadmap for Wicket 7 and Wicket 8
The DEVdev (Deventer Developers) is a new meetup for any developer in the eastern part of the Netherlands (the right side of the IJssel river). This presentation was delivered at the first meetup, and was kindly sponsored by Topicus B.V.
Unit Testing 101 presented at ESRI Developer Summit, March 24th, 2009. This talk reviews the key concepts of unit testing, the technologies used by DTSAgile in out development projects.
FAQ - why does my code throw a null pointer exception - common reason #1 Rede...Alan Richardson
A common reason for Null Pointer Exceptions in Java is a variable redeclaration instead of instantiation. Learn what that means, how to avoid it, and how to spot it, in this presentation.
Read the full blog post: http://testerhq.com/post/blogs/javafortesters/2017-08-29-faq-null-pointer-exception/
Visit my Java Web Site: http://javafortesters.com
---
# FAQ - why does my code throw a null pointer exception - common reason #1 Redeclaration
- Using `@BeforeClass` or `@Before` can setup data for use in tests
- Any 'variables' we instantiate need to be 'fields' rather than variables
- We want to instantiate them in the setup method rather than redeclare them
---
# Example of the Problem
I know I will use an `Adder` in my test so I create it as a field:
~~~~~~~~
public class WhyCodeThrowsNullPointerExceptionTest {
Adder adder;
~~~~~~~~
I don't want to re-instantiate it each time so I make an `@BeforeClass` method to instantiate it:
~~~~~~~~
@BeforeClass
public static void setupAdder(){
Adder adder = new Adder();
}
~~~~~~~~
**Warning: Error in the above code**
---
# Semantic Error
I just made a Semantic coding error. This won't be caught by a compiler, but it will cause my `@Test` to fail with a Null Pointer Exception.
In the setup method I really wanted to assign a value to the field, instead I created an new variable with the same name.
# In General
- Try to write one test at a time so that if you have a problem it is easier to identify where the problem is
- Try to write working isolated tests and then refactor to a more general solution when you need it - that way, you know it was working, so you just have to work backwards to find out what went wrong
- Try to use automated IDE refactoring rather than move code around manually
- Use the IDE syntax highlighting to help spot any issues
Have you ever thought how is it to work with ReactJS for a long time? I do. The talk is taking you through the life of the stack at HolidayCheck, lessons learned and other experiences.
Unit testing helps improving the quality of your code and greatly simplifies dealing with complex code. The testing framework of choice for React.js is Jest.
React keeps on evolving and making hard things easier for the average developer.
One case, where React was not particularly hard but very repetitive, is working with AJAX request. There is always the trinity of loading, success and possible error states that had to be handled each time. But no more as the <Suspense /> component makes life much easier.
Another case is performance of larger and complex applications. Usually React is fast enough but with a large application rendering components can conflict with user interactions. Concurrent rendering will, mostly automatically, take care of this.
You will learn all about using , showing loading indicators and handling errors. You will see how easy it is to get started with concurrent rendering. You will make suspense even more capable by combining it with concurrent rendering, the useTransition() hook and the component.
An Automation QA resume with 3 Years and 10 months of industry experience in the area of Software Testing (Automation) with a solid understanding and work experience in Web, Mobile, Desktop and API application testing domain
Struts has outgrown its reputation as a simple web framework and has become more of a brand. Because of this, two next generation frameworks are being developed within the project: Shale and Action 2.0. Action 2.0 is based on WebWork, and though its backing beans are similar to JSF, its architecture is much simpler, and easier to use.
Migrating to Struts Action 2.0 is more about unlearning Struts than it is about learning the "WebWork Way". Once you understand how simple WebWork is, you'll find that Struts Action 2.0 is a powerful framework that supports action-based navigation, page-based navigation, AOP/Interceptors, components and rich Ajax support.
Come to this session to see code comparisons and learn about migration strategies to use the kick-ass web framework of 2006.
A talk about unit testing for iOS apps. Part rambling introduction to test driven development, part examples of certain types of tests for iOS, and a brief mention of writing your tests using Kiwi.
The current state of the Apache Wicket framework in 2014 as presented at the DEVdev meetup held in Deventer, the Netherlands.
- A critique of ThoughtWorks' Technology Review 2014 where they slam JSF (jay) as a concept (nay)
- A look back at 10 years of Wicket
- A review of the current Wicket versions
- An outlook and roadmap for Wicket 7 and Wicket 8
The DEVdev (Deventer Developers) is a new meetup for any developer in the eastern part of the Netherlands (the right side of the IJssel river). This presentation was delivered at the first meetup, and was kindly sponsored by Topicus B.V.
Unit Testing 101 presented at ESRI Developer Summit, March 24th, 2009. This talk reviews the key concepts of unit testing, the technologies used by DTSAgile in out development projects.
Performance measurement methodology — Maksym Pugach | Elixir Evening Club 3Elixir Club
Доповідь Максима Пугача, Team Lead/Software Engineer at LITSLINK, на Elixir Evening Club 3, Kyiv, 13.12.2018
Наступна конференція - http://www.elixirkyiv.club/
A boss of mine once told me "Just see, my poorly written Vert.x app outperforms my poorly written Elixir app". Now it is time to take up the gauntlet.
Cлідкуйте за нами у соцмережах @ElixirClubUA та #ElixirClubUA
Анонси та матеріали конференцій - https://www.fb.me/ElixirClubUA
Новини - https://twitter.com/ElixirClubUA
Фото та невимушена атмосфера - https://www.instagram.com/ElixirClubUA
*Канал організаторів мітапа - https://t.me/incredevly
Most of the major internet companies have now declared themselves to be mobile first. Smartphones have become ubiquitous throughout the development world. But mobile development is fraught with challenges. There are more Android devices than iOS, but iOS users tend to spend more money. If you build your app for one, it is a complete re-write for the other. You may have heard of Cordova/PhoneGap, but the apps tend to be somewhat clunky looking.
Enter the Ionic Framework, a cross platform framework which combines PhoneGap with AngularJS and super fast CSS3 to make apps which perform at near native levels.
Presentation on the Batch JSR (JSR-352) in JavaOne India, Hyderabad 2013.
Thanks to http://www.slideshare.net/reza_rahman and http://www.slideshare.net/arungupta1 for the source slides.
Snabbkaffe is a library that helps testing concurrent and distributed systems.
It does so by moving the focus from /states/ to /effects/.
Developers find bugs by looking at the logs, Snabbkaffe does the same and automates the process.
It has advanced modes of testing: fault and scheduling injection.
It aims for efficiency: run test scenario once, verify multiple properties.
Open sourced in GitHub: https://github.com/kafka4beam/snabbkaffe
original (better quality) on https://docs.google.com/presentation/d/1bnwj8CrFGo5KekONYSeIHySdkoXZiewJxkHcZjXnzkQ/
slides from OpenDaylight Summit Oct 2016 Seattle
Applying Anti-Reversing Techniques to Java BytecodeTeodoro Cipresso
CS266 Software Reverse Engineering (SRE)Applying Anti-Reversing Techniques to Java Bytecode
Teodoro (Ted) Cipresso, teodoro.cipresso@sjsu.edu
Department of Computer Science
San José State University
Spring 2015
This is an introduction to unit testing using various mocking frameworks. It covers why you should consider using a mocking framework, how to apply mocks in your unit testing, and a high level comparison of various tools for mocking/stub creation. The distinction between mocks and stubs is clearly defined.
A brief introduction about the art of unit test, how to test a class, mock a collaborator and use a fake database. TDD is introduced. Code for exercises is available on github along with a detailed explanation. Examples and exercises are written in Java.
Zepto and the rise of the JavaScript Micro-FrameworksThomas Fuchs
Here are my slides from JSConf 2011 in Portland, Oregon. I was talking about Zepto, my micro-framework, WebKit-only (works on Firefox too, though) clone of the jQuery API, and why I think that Micro-Frameworks and Micro-Libraries are better suited for the mobile Web than traditional, monolithic libraries, like script.aculo.us, Prototype or jQuery. (A video of the talk is forthcoming and will be announced on my blog, http://mir.aculo.us).
Similar to Concurrency in Eclipse: Best Practices and Gotchas (20)
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Key Trends Shaping the Future of Infrastructure.pdf
Concurrency in Eclipse: Best Practices and Gotchas
1. Concurrency in Eclipse:Best Practices and Gotchas Andrew McCulloch andrew.mcculloch@oracle.com Carlin Rogers carlin.rogers@oracle.com
2. About Us Andrew McCulloch Andrew.McCulloch@oracle.com Principle Member of Technical Staff at Oracle working on the Oracle Enterprise Pack for Eclipse (OEPE) Lead on AppXray feature which manages dependencies in a user's workspace Area of interest include concurrency and performance tuning Carlin Rogers Carlin.Rogers@oracle.com Principle Member of Technical Staff at Oracle working on the Oracle Enterprise Pack for Eclipse (OEPE) Committer on the JavaServer Faces Tools Project at Eclipse Areas of interest include web frameworks, concurrency, and performance tuning
3.
4. Reactions to Concurrency "...we always get deadlock messages, and have no idea what they mean (in context) and we just ignore them.“ - Anonymous SQL Server Developer
5. Agenda Overview concurrency Describe our project and experience Problems and gotchas we encountered Practical debugging tips Best practices Questions
20. Problems We Encountered Race Conditions Lazy initialization of, and access to, models that were not thread safe - uncontrolled concurrent access to mutable data.
21. Race Conditions Exceptions from EMF models Exceptions during access/initialization of EMF Models [Bugzilla 228748] java.lang.NullPointerException at org.eclipse.emf.ecore.util.EContentAdapter.addAdapter(EContentAdapter.java:352) at org.eclipse.emf.ecore.util.EContentAdapter.setTarget(EContentAdapter.java:225) at org.eclipse.emf.ecore.util.EContentAdapter.setTarget(EContentAdapter.java:188) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.didAdd(BasicNotifierImpl.java:77) at org.eclipse.emf.common.util.BasicEList.addUnique(BasicEList.java:646) at org.eclipse.emf.common.util.BasicEList.add(BasicEList.java:626) at org.eclipse.emf.common.notify.impl.BasicNotifierImpl$EAdapterList.add(BasicNotifierImpl.java:129) at org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigManager.addFacesConfigChangeAdapter( JSFAppConfigManager.java:769) … at org.eclipse.jst.jsf.core.jsfappconfig.JSFAppConfigManager.getFacesConfigModels( JSFAppConfigManager.java:409)
22. Debugging Tip Intermittent bugs can be very difficult to reproduce in a system test. Difficult to reproduce race condition in EMF code using debugger. Narrow the scope - create simple controlled test of the specific code path in the stack trace from the exception. Example: launch multiple threads, each calling the JSFAppConfigManager.getFacesConfigModels() method
24. Problems We Encountered Race Conditions Lazy initialization of, and access to, models that were not thread safe - uncontrolled concurrent access to mutable data. Deadlocks Know your third party code - it may take a scheduling rule.
25. Lock Order and Third Party Code Deadlocks from calls in other libraries that require a scheduling rule. For example… Thread A - AppXRay Job Thread B – Main - Calls beginRule with the IProject as the scheduling rule. - UI component calls to access information from shared model, enters synchronized block. - Tries to access information from shared model, waits to enter synchronized block locked by Thread B. - Third party code requires JDT to resolve classpaths for the projects, and tries to take the IProjectscheduling rule.
26.
27. Eclipse Debugger - turn on "Show Monitors" to see locks for synchronized blocks
31. Problems We Encountered Race Conditions Lazy initialization of, and access to, models that were not thread safe - uncontrolled concurrent access to mutable data. Deadlocks Know your third party code - it may take a scheduling rule. Thread Starvation JobManager.waitForRun prevented jobs with complex relationships from running in a timely manner.
32. Scheduler issues [Bugzilla 320329] Not a typical Thread Starvation case, but illustrates a point. Job dependencies can be complex when multiple jobs launch in response to a single event. In the UI progress dialog the running job appeared to be deadlocked when it was not at fault. Dynamic Analysis tools can pinpoint the true problem Our profiling tool pointed out that a loop in the scheduler was executed millions of times. The issue was in the Job scheduler in open source code After several iterations at a patch the issue was resolved
33. Debugging Tip Be familiar with dynamic analysis tools. We use several including Oracle JRockit Mission Control and third-party tools. Don’t ignore org.eclipse code in your analysis. Eclipse is a quality product but bugs do get through and the community can help resolve them.
34. Best Practices “Synchronize access to shared mutable data” Enforce a consistent locking order. “Avoid excessive synchronization” Don’t be hesitant to debug into open source code, submit questions, bugs, and patches. This make your product and Eclipse better
35. Gotchas Job.yieldRule() Third party code may move your job to waiting state and yield the scheduling rule to other jobs to avoid potential deadlocks. (bug 283449)
36. Job.yieldRule() Thread dump from deadlock java.lang.Object.wait(Native Method) at org.eclipse.core.internal.jobs.ThreadJob.waitForRun(ThreadJob.java:270) at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:199) at org.eclipse.core.internal.jobs.JobManager.yieldRule(JobManager.java:1398) at org.eclipse.core.internal.jobs.InternalJob.yieldRule(InternalJob.java:600) at org.eclipse.core.runtime.jobs.Job.yieldRule(Job.java:709) at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl$ SharedObject.waitForLoadAttempt(ModelManagerImpl.java:139) at org.eclipse.wst.sse.core.internal.model.ModelManagerImpl.getExistingModel( ModelManagerImpl.java:1137)
39. Determine if you can move the call to third party code outside of the synchronization.
40.
41. Gotchas Job.yieldRule() Third party code may move your job to waiting state and yield the scheduling rule to other jobs to avoid potential deadlocks. (bug 283449) EventLoopProgressMonitor Starting a rule on the UI thread will have unintended consequences regardless of how long the rule is held.
42. Event loop will be interleaved Acquiring a scheduling rule from the UI thread may appear as a UI freeze. Alternatively in some instances acquiring a scheduling rule on the UI thread may cause calls to the progress monitor to execute other UI events which will eliminate the appearance of a freeze but can cause errors with non-reentrant code. RunnableWithProgress also replaces null progress monitors.
43. Debugging Tip Analyze stack trace for EventLoopProgressMonitor Look for entries on the stack that you would not expect to be executing from within your code. Look for tell-tale exception “Attempted reentrant call …” Determine where the scheduling rule is acquired Can that code be moved off of the UI thread? Can the UI widget be redesigned to update asynchronously?
44. Best Practices “Synchronize access to shared mutable data” Enforce a consistent locking order. “Avoid excessive synchronization” Don’t be hesitant to work with open source code. Use ILock for synchronization Run as little as possible on the UI thread. Move code requiring ISchedulingRules to a Job.
45. In Conclusion… “Synchronize access to shared mutable data” Enforce a consistent locking order. “Avoid excessive synchronization” Don’t be hesitant to work with open source code. Use ILock for synchronization Run as little as possible on the UI thread. Move code requiring ISchedulingRules to a Job.
46. Suggested References Java Concurrency in Practice Brian Goetz (2006) Effective Java (2nd Edition) Joshua Bloch (2008) Concurrent Programming in Java Doug Lea (1999)