The document discusses best practices for deploying Java applications in production environments. It covers key areas like deployment, monitoring, log management, robustness and organization. Specific practices discussed include minimizing deployment components, making applications friendly to co-location, limiting configurable parameters, and using tags for traceability. It also provides guidance on exposing business metrics, logging at different levels of detail, and leveraging JMX for monitoring.
These are the presentation slides demonstratingseven versions of the UI of same HTML5 application using various libraries and frameworks. This application is described in detail in the O'Reilly book "Enterprise Web Development"
These are the presentation slides demonstratingseven versions of the UI of same HTML5 application using various libraries and frameworks. This application is described in detail in the O'Reilly book "Enterprise Web Development"
Integrating consumers IoT devices into Business WorkflowYakov Fain
From the software development perspective IoT is about programming "things", connecting them with each other and integrating them with existing applications. This presentation will demonstrate how IoT-enabled devices from multiple manufacturers can be integrated into a workflow of a business application. You'll see a live demo of using commercial consumer devices as a part of an application that utilizes such technologies such as REST API, OAuth, Websockets, and Java. This presentation will give you an idea of how to go about integration of new devices as they become available on the market.
An introduction to the AngularJS JavaScript MVC framework from Google. Tailored for Java developers. Presented at the Orange County Java Users Group on 10/09/2014
Présentation de Maven et de son utilisation en entreprise dans le cadre du Ch'ti JUG, le 15 juin 2009.
Pourquoi Maven ? Pourquoi l'adopter ? Les bonnes et mauvaise pratiques. Son avenir ...
AngularJS 1.3 is by far the best version of Angular available today. It was just released a few weeks ago. It's chock full of bug fixes, feature enhancements and performance improvements.
YouTube link: - https://youtu.be/bghVyCbxj6g
Lessons learned from building HomeMarks native iPhone application to synchronize Core Data with a RESTful backend built using rails 3.0.0.pre. This covers a previous design methodology called the AJAX head pattern which decouples rails applications from the views they present which allowed an easy API foundation for the iPhone application and data sync methods.
Integrating consumers IoT devices into Business WorkflowYakov Fain
From the software development perspective IoT is about programming "things", connecting them with each other and integrating them with existing applications. This presentation will demonstrate how IoT-enabled devices from multiple manufacturers can be integrated into a workflow of a business application. You'll see a live demo of using commercial consumer devices as a part of an application that utilizes such technologies such as REST API, OAuth, Websockets, and Java. This presentation will give you an idea of how to go about integration of new devices as they become available on the market.
An introduction to the AngularJS JavaScript MVC framework from Google. Tailored for Java developers. Presented at the Orange County Java Users Group on 10/09/2014
Présentation de Maven et de son utilisation en entreprise dans le cadre du Ch'ti JUG, le 15 juin 2009.
Pourquoi Maven ? Pourquoi l'adopter ? Les bonnes et mauvaise pratiques. Son avenir ...
AngularJS 1.3 is by far the best version of Angular available today. It was just released a few weeks ago. It's chock full of bug fixes, feature enhancements and performance improvements.
YouTube link: - https://youtu.be/bghVyCbxj6g
Lessons learned from building HomeMarks native iPhone application to synchronize Core Data with a RESTful backend built using rails 3.0.0.pre. This covers a previous design methodology called the AJAX head pattern which decouples rails applications from the views they present which allowed an easy API foundation for the iPhone application and data sync methods.
S314011 - Developing Composite Applications for the Cloud with Apache TuscanyLuciano Resende
Today's cloud environments pose new challenges for application developers: hiding cloud infrastructure from business logic, assembling components on heterogeneous and distributed cloud environments, and optimizing the provisioning of the required cloud resources. This session will demonstrate how to use Apache Tuscany and the Service Component Architecture (SCA) to develop, build, and run an application composed of several service components in a distributed cloud environment. We'll illustrate how to encapsulate cloud infrastructure services as SCA components to simplify the construction and assembly of the application and how to move components around and rewire the application to adjust to new business and cloud deployment conditions.
Consegi 2010 - Dicas de Desenvolvimento Web com RubyFabio Akita
Esta é a palestra que dei no Consegi 2010 em Brasília. Sobre dicas gerais sobre web, em particular implementando com Ruby on Rails. YSlow, Full Text Search e Tarefas Assíncronas.
Embracing Observability in CI/CD with OpenTelemetryCyrille Le Clerc
Discover how observability and OpenTelemetry offer unprecedented solutions for both CI/CD administrators and dev teams to troubleshoot CI platforms and solve much more problems thanks to a vibrant community and a growing ecosystem. We will see with real life CI/CD pipelines using Jenkins, Maven, and Ansible how OpenTelemetry offers unprecedented solutions to troubleshoot software delivery pipelines. How the open source and standard nature of OpenTelemetry enables the emergence of a vibrant ecosystem of OpenTelemetry aware CI/CD tools to observe the entire software supply chain and help DevOps teams solve problems that go way beyond the observability use cases we have in mind.
https://community.cncf.io/events/details/cncf-cloud-native-canada-presents-november-2021-eastern-canadian-cncf-meetup-kubernetes-123-release-update-and-cicd-observability/
Open Source Monitoring for Java with JMX and Graphite (GeeCON 2013)Cyrille Le Clerc
Fast feedback from monitoring is a key of Continuous Delivery. JMX is the right Java API to do so but it unfortunately stayed underused and underappreciated as it was difficult to connect to monitoring and graphing systems.
Throw in the sin bin the poor solutions based on log files and weakly secured web interfaces! A new generation of Open Source tooling makes it easy to graph java application metrics and integrate them to traditional monitoring systems like Nagios.
Following the logic of DevOps, we will look together how best to integrate the monitoring dimension in a project: from design to development, to QA and finally to production on both traditional deployment and in the Cloud.
Come and discover how the JmxTrans-Graphite ticket can make your life easier.
Monitoring Open Source pour Java avec JmxTrans, Graphite et Nagios - DevoxxFR...Cyrille Le Clerc
Le feedback rapide offert par le monitoring est un element essentiel des bonnes pratiques de Continuous Delivery. Java dispose dans son ecosysteme d'un composant robuste dedie a cela : JMX.
Cependant, la difficulte de raccordement de JMX a des outils de supervision et de graphe a longtemps ete un frein a son adoption.
Jetez aux orties les solutions bancales a base de logs applicatifs ou d'interface web mal protegees, et venez decouvrir une voie ouverte. Une nouvelle generation d'outils Open Source permet de grapher simplement les metriques de vos applications et de les fournir a un systeme de supervision et d'alerte.
Dans une logique DevOps, nous verrons ensemble comment integrer la dimension Monitoring dans un projet : de la conception des metriques par les developpeurs, a l'integration des besoins des equipes Ops et Q&A, en deploiement traditionnel ou dans le Cloud. JmxTrans, Graphite et Nagios, ce tryptique peut vous faciliter la vie, venez decouvrir comment.
L'application demo : http://demo-cocktail.jmxtrans.cloudbees.net
Le code source de l'application demo : https://github.com/jmxtrans/embedded-jmxtrans-samples/tree/master/embedded-jmxtrans-webapp-coktail
Embedded JmxTrans : https://github.com/jmxtrans/embedded-jmxtrans
Paris NoSQL User Group - In Memory Data Grids in Action (without transactions...Cyrille Le Clerc
In Memory Data Grids in Action with Oracle Coherence presented to No SQL users.
The "transactions" chapter is missing as it has been rescheduled to another session.
Cyrille Le Clerc (Xebia), Erwan Alliaume (Xebia), Jean Michel Bea (Fast Connect) ont présenté au Paris Java User Group les principes du Data Grid.
Cache distribué, Network Attached Memory, Data Grid ou Cloud Computing sont des termes très à la mode qui s’inscrivent dans la même tendance.
Nous présenterons pendant cette soirée le chemin qui nous à conduit d’un simple EH Cache à des grilles de centaines de giga octects de données qui s’étalent sur des data center.
CACHES DISTRIBUES
Les Cache Distribués se sont banalisés avec les frameworks Open Source Jboss Cache et EH Cache distribué. Où en sommes nous aujourd’hui ?
- Quels sont les cas d’utilisation d’un cache distribué ? Quels gains en attendre ?
- Comment migrer d’un cache local à un cache distribué ? Nos frameworks sont-ils adaptés à ces caches distribués ?
- Comment fonctionne un cache distribué ?
NETWORK ATTACHED MEMORY
Le concept de Network Attached Memory a décollé dans l’univers Java avec Terracotta et offre à nos applications un espace mémoire encore inimaginable il y a peu. Que se cache-t-il derrière ?
- Quels sont les cas d’utilisation des technologies de Network Attached Memory ?
- Cette mémoire virtuellement infinie n’introduit-elle pas des contraintes ?
- Si la mémoire est partagée, qu’en est-il des traitements ?
- Quelles sont les perspectives des technologies de Network Attached Memory ?
DATA GRID
Le concept de data grid s’est popularisé avec les services Google Big Table ou Amazon S3 mais aussi avec des sites comme eBay qui annoncent des data center gigantesques. Cela va-t-il arriver dans l’informatique classique ?
- Qu’est-ce qu’une grille de donnée ? Comment ça marche ?
- Qui a besoin de Data Grid ? Est-ce réservé aux hyper scalable comme eBay ou Facebook ? Comment faisait-on avant ? En ai-je besoin ?
- Comment structurer une application pour utiliser une grille de données ? Cela la change-t-il la façon de programmer ?
- Map Reduce est-il un pattern utilisable avec une grille de données ? Est-ce le seul ?
- Les grilles de données vont-elles remplacer les bases de données traditionnelles ? Comment peuvent-elles cohabiter ?
DATA GRID, CLOUD ET LES AUTRES
Data Grid, Grid Computing, Cloud Computing et eXtreme Transaction Processing (XTP) sont fréquement associés.
Comment positionner Data Grid par rapport à ces technologies ?
Quels positionnements ont les acteurs de cet univers ? Amazon S3&EC2 ? Coherence ? Gigaspace ? Google App engine & Big Table ? Grid Gain ? Terracotta ? Websphere eXtreme Scale ?
Et les mainframes dans tout ça ?
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.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
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
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.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
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!
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/
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Bonnes pratiques des applications java prêtes pour la production
1. Bonnes Pratiques
Des
Applications Java
Prêtes pour la Production
des Prêtes pour la
Bonnes Pratiques
Applications Java Production
Cyrille Le Clerc
Sunday, June 13, 2010
2. Cyrille Le Clerc
Architecte Java EE depuis 11 ans
Committer Apache CXF
Directeur associé chez Xebia
cleclerc@xebia.fr
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
3. Les enjeux
Améliorer la disponibilité des applications
Réduire le cycle de vie des projets
Améliorer les plateformes
Diminuer le coût d’exploitation
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
4. Les axes clefs
Le déploiement
La supervision et le monitoring
La gestion des logs
La robustesse
L’organisation
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
5. Le Déploiement
Minimiser le nombre de composants à déployer
Colocation friendly
Les paramètres de configuration
La traçabilité
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
6. Le Déploiement
Minimiser le nombre de composants à déployer
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
7. Minimiser le nombre de composants à
déployer
my-app
html *.html
*.html
css
img
js
jsp
*.jsp
*.jsp
WEB-INF
classes
lib
www.xebia.fr / blog.xebia.fr
web.xml 5
Sunday, June 13, 2010
8. Minimiser le nombre de composants à
déployer
my-app
html
*.html just in case
css
img
js
jsp *.jsp
*.jsp
# don't proxy static content !
ProxyPassMatch ^(/my/.*.html)$ ! WEB-INF
ProxyPassMatch ^(/my/.*.css)$ ! classes
2 1
ProxyPassMatch ^(/my/.*.gif)$ ! lib
ProxyPassMatch ^(/my/.*.jpeg)$ !
ProxyPassMatch ^(/my/.*.png)$ ! web.xml
ProxyPassMatch ^(/my/.*.js)$ !
# proxy dynamic content my-app static files my-app.war
ProxyPass /my/ http://my:8080/my/
Apache Httpd Tomcat
3 httpd.conf
www.xebia.fr / blog.xebia.fr 5
Sunday, June 13, 2010
9. Minimiser le nombre de composants à
déployer
my-app
html
*.html
css
img
js
jsp *.jsp
*.jsp
WEB-INF
classes
lib
# proxy /my/ 1
ProxyPass /my/ http://my:8080/my/ web.xml
2 httpd.conf my-app static files my-app.war
Cache Proxy Apache Httpd Tomcat
www.xebia.fr / blog.xebia.fr 5
Sunday, June 13, 2010
10. Colocation friendly
Colocalisation de serveur (Linux, Windows, etc)
▶ Minimiser les répertoires absolus et les ports réseaux
▶ Ports dédiés par application (e.g. http : 10080)
▶ Chemins dédiés de répertoires (e.g. /etc/my-app-1/...)
Colocalisation de serveur Java EE
▶ Ne pas utiliser de variable statique
▶ Chemins dédiés de répertoires (e.g. ${java.io.tmpdir}/my-app-1/...)
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
11. Le Déploiement
Les paramètres de configuration
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
12. Les paramètres de configuration
Limiter les paramètres de configuration dont la
valeur change suivant les environnements
▶ Ports réseau standards (e.g. 80, 1521)
▶ Noms logiques de host/serveurs (e.g. my-app-srv-1)
Production
db-α
p1
app-1
1521
/ap
10080
80 srv-i, srv-j, srv-k
...
443 /ap
Internet om db-β
p2
p any.c app-2 1521
m y-com
20080
Firewall srv-l, srv-m, srv-n
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
13. Les paramètres de configuration
Production
db-α
p1
app-1
1521
/ap
10080
80 srv-i, srv-j, srv-k
Sa
...
m
e
ho
443 /ap
s
.com db-β
tn
p2
pany
Sa
app-2
am
1521
y-com
m
m
es
20080
e
srv-l, srv-m, srv-n
ne
Firewall
tw
or
Ca
k
n
po
Internet NO communication
be
rt
s
sa
m
Validation
e
IP
!
db-α
p1
app-1
1521
/ap
10080
80 srv-i, srv-j, srv-k
...
proxy 443 /ap
om p2 db-β
any.c app-2 1521
omp
my-c 20080
Firewall srv-l, srv-m, srv-n
www.xebia.fr / blog.xebia.fr 5
Sunday, June 13, 2010
14. Le Déploiement
La traçabilité
my-app/tags/1.2.3/
artefact taggé
my-app-1.2.3.war
Co
mme
Repository nt
dé
plo
ye
r
?
Dev zone Data centers
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
15. Supervision et Monitoring
Exposer des indicateurs métier
Logs vs. JSP vs. JMX
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
16. Supervision et Monitoring
Exposer des indicateurs métier
Suivre les succès et échecs vécus par les
utilisateurs
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
17. Supervision et Monitoring
Logs de monitoring
Détail par invocation vs. moyenne par minute
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
18. Monitoring : logs vs. jsp vs. jmx
JSP
Attention à la sécurité !
Human Friendly and/or Script Friendly
/my-app/seye5E7E/jmx/cxf.jsp
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
19. Monitoring : logs vs. jsp vs. jmx
JMX
Sécurité ++
Simple
Human Friendly and/or Script Friendly
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
20. Monitoring : logs vs. jsp vs. jmx
JMX : Simple
@ManagedResource
public class DemoServiceImpl {
private final AtomicInteger invocationCount = new AtomicInteger();
@ManagedAttribute
public int getInvocationsCount() {
return invocationCount.get();
}
@ManagedOperation
public void purge(){
// ...
}
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
21. Monitoring : logs vs. jsp vs. jmx
JMX : VisualVM
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
22. Monitoring : logs vs. jsp vs. jmx
JMX : Hyperic HQ & cie
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
23. Monitoring : logs vs. jsp vs. jmx
JMX & JSP
Powered by JMX !
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
24. La gestion des logs
Exceptions java & stack trace vs. code erreur
Troubleshooting vs. logs longue durée &audit
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
25. La gestion des logs
2010/04/12 14:37:19 [catalina-exec-14] WARN o.a.cxf.phase.PhaseInterceptorChain - Application {http://ws.xebia.fr/customer/v1_0}customerService#{http://ws.xebia.fr/customer/v1_0}getCustomer has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Exception getting customer '71'
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155) ~[cxf-rt-core-2.2.7.jar:2.2.7]
at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:86) ~[cxf-rt-frontend-jaxws-2.2.7.jar:2.2.7]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:121) ~[cxf-rt-core-2.2.7.jar:2.2.7]
at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:60) ~[cxf-rt-frontend-jaxws-2.2.7.jar:2.2.7]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75) ~[cxf-rt-core-2.2.7.jar:2.2.7]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) ~[cxf-rt-core-2.2.7.jar:2.2.7]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) ~[na:1.6.0_17]
Exceptions & stack trace
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) ~[na:1.6.0_17]
at java.util.concurrent.FutureTask.run(FutureTask.java:138) ~[na:1.6.0_17]
at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37) ~[cxf-rt-core-2.2.7.jar:2.2.7]
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106) ~[cxf-rt-core-2.2.7.jar:2.2.7]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243) ~[cxf-api-2.2.7.jar:2.2.7]
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:110) [cxf-rt-core-2.2.7.jar:2.2.7]
at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:98) [cxf-rt-transports-http-2.2.7.jar:2.2.7]
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:423) [cxf-rt-transports-http-2.2.7.jar:2.2.7]
at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:178) [cxf-rt-transports-http-2.2.7.jar:2.2.7]
at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:142) [cxf-rt-transports-http-2.2.7.jar:2.2.7]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:179) [cxf-rt-transports-http-2.2.7.jar:2.2.7]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:103) [cxf-rt-transports-http-2.2.7.jar:2.2.7]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) [servlet-api.jar:na]
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(AbstractHTTPServlet.java:159) [cxf-rt-transports-http-2.2.7.jar:2.2.7]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) [catalina.jar:6.0.26]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.26]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343) [spring-security-web-3.0.2.RELEASE.jar:na]
vs.
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:90) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188) [spring-security-web-3.0.2.RELEASE.jar:na]
code erreur
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149) [spring-security-web-3.0.2.RELEASE.jar:na]
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) [spring-web-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) [spring-web-3.0.2.RELEASE.jar:3.0.2.RELEASE]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) [catalina.jar:6.0.26]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) [catalina.jar:6.0.26]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) [catalina.jar:6.0.26]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [catalina.jar:6.0.26]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [catalina.jar:6.0.26]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [catalina.jar:6.0.26]
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:555) [catalina.jar:6.0.26]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [catalina.jar:6.0.26]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) [catalina.jar:6.0.26]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) [tomcat-coyote.jar:6.0.26]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) [tomcat-coyote.jar:6.0.26]
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:396) [tomcat-coyote.jar:6.0.26]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_17]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_17]
at java.lang.Thread.run(Thread.java:637) [na:1.6.0_17]
Caused by: java.lang.RuntimeException: Exception getting customer '71'
at fr.xebia.ws.customer.v1_0.CustomerServiceImpl.getCustomer(CustomerServiceImpl.java:101) ~[CustomerServiceImpl.class:na]
at fr.xebia.ws.customer.v1_0.CustomerServiceImpl$$FastClassByCGLIB$$30f63c56.invoke(<generated>) ~[cglib-nodep-2.2.jar:na]
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:191) ~[cglib-nodep-2.2.jar:na]
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:692) ~[spring-aop-3.0.1.RELEASE.jar:3.0.1.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) ~[spring-aop-3.0.1.RELEASE.jar:3.0.1.RELEASE]
at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80) ~[spring-aop-3.0.1.RELEASE.jar:3.0.1.RELEASE]
at fr.xebia.audit.AuditAspect.logMessage(AuditAspect.java:139) ~[AuditAspect.class:na]
at sun.reflect.GeneratedMethodAccessor62.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_17]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_17]
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:622) ~[spring-aop-3.0.1.RELEASE.jar:3.0.1.RELEASE]
at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:611) ~[spring-aop-3.0.1.RELEASE.jar:3.0.1.RELEASE]
at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65) ~[spring-aop-3.0.1.RELEASE.jar:3.0.1.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161) ~[spring-aop-3.0.1.RELEASE.jar:3.0.1.RELEASE]
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) ~[spring-aop-3.0.1.RELEASE.jar:3.0.1.RELEASE]
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.0.1.RELEASE.jar:3.0.1.RELEASE]
at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:625) ~[spring-aop-3.0.1.RELEASE.jar:3.0.1.RELEASE]
at fr.xebia.ws.customer.v1_0.CustomerServiceImpl$$EnhancerByCGLIB$$184a797f.getCustomer(<generated>) ~[cglib-nodep-2.2.jar:na]
at sun.reflect.GeneratedMethodAccessor61.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_17]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_17]
at org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:173) ~[cxf-rt-core-2.2.7.jar:2.2.7]
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:89) ~[cxf-rt-core-2.2.7.jar:2.2.7]
... 62 common frames omitted
Caused by: java.lang.RuntimeException: Too many concurrent access to ZeSlowService
at fr.xebia.productionready.backend.zeslowservice.ZeSlowServiceBoundedImpl.find(ZeSlowServiceBoundedImpl.java:57) ~[ZeSlowServiceBoundedImpl.class:na]
at fr.xebia.ws.customer.v1_0.CustomerServiceImpl.updateCustomerWithZeSlowServiceData(CustomerServiceImpl.java:166) ~[CustomerServiceImpl.class:na]
at fr.xebia.ws.customer.v1_0.CustomerServiceImpl.getCustomer(CustomerServiceImpl.java:99) ~[CustomerServiceImpl.class:na]
... 84 common frames omitted
2010/04/12 15:06:09 [catalina-exec-18] WARN o.a.cxf.phase.PhaseInterceptorChain -
Application {http://ws.xebia.fr/customer/v1_0}customerService
#{http://ws.xebia.fr/customer/v1_0}getCustomer has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Exception getting customer '1'
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155)
Caused by: java.lang.RuntimeException: Exception getting customer '1'
at fr.xebia.ws.customer.v1_0.CustomerServiceImpl.getCustomer(CustomerServiceImpl.java:101)
Caused by: java.lang.RuntimeException: Something went wrong
at fr.xebia.ws.customer.v1_0.CustomerServiceImpl.doSomeWork(CustomerServiceImpl.java:66)
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
26. La gestion des logs
>= WARN, compact stack trace, collected
logs
my-app.log
only audit, collected
my-app-audit.log 10x10Mo, rolling,
NOT collected,
my-app-troubleshooting.log mostly >= WARN
my-app-troubleshooting-1.log
...
my-app-troubleshooting-9.log
logs-to-collect easy to collect log files
my-app-audit-20100411.log
my-app-audit-201004....log
...
my-app-20100411.log
my-app-201004...log
...
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
27. La gestion des logs
Audit par annotation
@RolesAllowed("ROLE_USER")
@Audited(message = "CustomerService.getCustomer(#{args[0]})")
public Customer getCustomer(long id) throws MyException {
// ...
}
Exemple de message
...
2010/04/12-17:18:00:266
CustomerService.getCustomer(12) by ze-remote-app coming from 9.0.1.53
...
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
28. La Robustesse
Dépendances inter-application : fail fast est-il synonyme de
fragilité ?
Prévention des saturations et des effets
"domino" : l'art du code défensif,
Les modes dégradés
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
29. La Robustesse
Dépendances inter-application : fail fast est-il synonyme de
fragilité ?
Bloquer le démarrage pour mauvaise
configuration
Ne pas bloquer le démarrage pour indisponibilité
d’une dépendance
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
30. La Robustesse
Prévention des saturations et des effets
"domino" : l'art du code défensif
Sh
or
im t tim
po
ssi eou
ble t i
Sometimes ! s
Presentation & Business
Slow
Layer
Service
Sometimes
Presentation & Business Slow
Layer Service
limit concurrent invocations !
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
31. La Robustesse
Les modes dégradés
Mieux vaut-il un service limité ou un système en
panne ?
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
32. L’organisation
Prévoir l’exploitation
Les développeurs en support niveau 3
You Build It, You Run It !
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
33. L’organisation
Prévoir l’exploitation
Dès la conception
Processus itératif
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
34. L’organisation
Les développeurs en support niveau 3
Prendre conscience
Responsabiliser
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
35. L’organisation
“You Build It You Run It !”
Amazon
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010
36. Formation !
Formation
Applications Java Prêtes pour la Production
Les 17 & 18 Mai 2010 !
www.xebia.fr / blog.xebia.fr 2
Sunday, June 13, 2010