Devops for Growth
107.5K views | +9 today
Follow
Devops for Growth
For Product Owners/Product Managers and Scrum Teams: Growth Hacking, Devops, Agile, Lean for IT, Lean Startup, customer centric, software quality...
Curated by Mickael Ruau
Your new post is loading...
Your new post is loading...

Popular Tags

Current selected tag: 'j2ee'. Clear
Scooped by Mickael Ruau
Scoop.it!

Java Exceptions - DZone Java

Java Exception is a class created to handle abnormal application behavior.  In this article, I'll explain how to use the Java Exception class and how to create your exception structure considering the existing Java Exceptions design.  Java exception notion is one of the critical milestones in java and every developer must know it.  

Mickael Ruau's insight:

 

Java Exception Structure Is More Informative Than You Think

Java Exceptions have a structure that is pretty informative and can tell the developer a set of important things (if the developer uses this structure properly). So, here, you can see the basic structure:

The main parent that can catch all possible situations is Throwable which has 2 children: Error and Exception.   

Java Error

Java Error case stands for abnormal situations. Once an Error appears application will be likely shut down.

Java Exception

Java Exceptions, unlike Error, have a chance to recover an application from a problem and try to keep the application up. Exceptions also split into 2 groups:

Exceptions are represented by Runtime and Not Runtime exceptions, also known as checked exceptions. This classification is pretty similar to Error Exceptions but, in that division, the Checked exception is more optimistic in terms of recovery.

Checked and Unchecked Exceptions

In Java, there are 2 types of exceptions. Checked exceptions force developers to create handler exceptions or rethrown them. If a checked exception is rethrown, then the java function has to declare it in its signature. Unchecked exception unline checked doesn't require any handling. Such design meant that unchecked exceptions can't be handled and are doomed to be thrown up to the top parent.  

Exception Handling in Java

There are two ways to process exceptions thrown: Handle it inside the current method or just rethrow it. There is no better way to do it; you might have one parent handler or handle it somehow, e.g. make retry logic.  

Good, Bad, Ugly

After the introduction, we can split all exceptions into 3 groups: Checked, Runtime, and Error. The main idea is that each of them would be thrown into different situations. The most optimistical is a Checked exception. The Runtime would belong to a situation with a small chance of recovery. And, the most pessimistic is Error.  

 

No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Tutoriel de découverte de Spring Batch

Tutoriel de découverte de Spring Batch | Devops for Growth | Scoop.it
Tutoriel de découverte de Spring Batch
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Externalisez la configuration de vos webapps Spring et sauvez un chaton! | Blog Xebia - Expertise Technologique & Méthodes Agiles

Externalisez la configuration de vos webapps Spring et sauvez un chaton! | Blog Xebia - Expertise Technologique & Méthodes Agiles | Devops for Growth | Scoop.it
Bien externaliser la configuration de votre application est la clé qui ouvre les portes de l'automatisation des déploiements, du déploiement continu
Mickael Ruau's insight:

Il existe plusieurs stratégies de configuration des applications en fonction de leur environnement de déploiement. Elles peuvent toutes être décrites par l’une des approches suivantes :

  • Configuration manuelle,
  • Duplication du livrable,
  • Duplication de la configuration dans le livrable,
  • Externalisation totale.
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Le design pattern DTO

Le design pattern DTO | Devops for Growth | Scoop.it

Prendre en compte le fonctionnement client-serveur et prévoir les échanges de données qui s'effectueront entre client et serveur.

Mickael Ruau's insight:
Nécessité des DTO

 

Actuellement, la structure de notre architecture client-serveur induit le fonctionnement suivant : 

  1. l'utilisateur de l'application veut se connecter et saisit son identifiant et son mot de passe
  2. le client envoie ces informations au serveur et appelle le service correspondant à la gestion des utilisateurs (UserService)
  3. le service fait appel au DAO correspondant (UserDAO) 
  4. le DAO renvoie au service l'objet User correspondant à l'identifiant et au mot de passe qu'il a reçus
  5. le service renvoie au client cet objet User
  6. le client valide la réception de l'objet User et connecte l'utilisateur

 

Dans le déroulement de ce processus, nous ne nous préoccupons à aucun moment du contenu de l'objet User ni du modèle de données en règle générale. 

Toutefois, la couche de persistance que nous avons implémenté dans le projet PGE JPA comporte une association bidirectionnelle entre User et Event. En effet, chaque User possède une collection d'Event et chaque Event possède un attribut User correspondant à son créateur.

Donc lors de l'étape 5 ci-dessus, le service envoie au client un objet User, mais envoie en même temps tous les objets Event contenus dans la collection. Et comme chaque Event possède un User, ces objets User contenus dans dans les Event sont également envoyés, et les envois bouclent ainsi indéfiniment entre les deux entités.

 

Pour résoudre ce problème, il existe un design pattern nommé DTO, pour Data Transfer Object. Il consiste à créer une nouvelle représentation du modèle de données, épuré et pensé pour le transport des informations fournies par un DAO.

No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Avenir de Java EE : la fondation Eclipse lance le projet Eclipse Enterprise for Java (EE4J)

En septembre dernier, Oracle a annoncé la disponibilité de Java 8 EE, une annonce dont le fait le plus marquant est que l'entreprise abandonne Java EE.

Sans parler d'abandon, Oracle indiquait alors qu'il était mieux pour l'avenir de Java EE de le confier à la communauté open source. C'est fondation Eclipse qui a été choisie.

No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Tutoriel Spring 4 : injection dépendances

Tutoriel Spring 4 : injection dépendances | Devops for Growth | Scoop.it
Avec Objis, spécialiste formation Spring, maîtrisez par la pratique l’injection de dépendances avec la version 4 de Spring. Comprenez alors ce qui (...)
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

J2EE Misconfiguration: Unsafe Bean Declaration - OWASP

J2EE Misconfiguration: Unsafe Bean Declaration - OWASP | Devops for Growth | Scoop.it
Entity beans that expose a remote interface become part of an application's attack surface. For performance reasons, an application should rarely use remote entity beans, so there is a good chance that a remote entity bean declaration is an error.
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

JBoss Tools - CDI

JBoss Tools - CDI | Devops for Growth | Scoop.it
A bunch of wizards are available for easier creation of:

CDI Web project

Bean

Interceptor

Decorator

Qualifier Annotation

Scope Annotation

Stereoptype Annotation

Interceptor Binding Annotation

Annotation Literal

and more.
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Audit des performances d'une application en Java EE

Audit des performances d'une application en Java EE | Devops for Growth | Scoop.it
Cet article est une introduction à l'audit de performance d'une application en Java/Java EE.
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

J2EE[tm] Design Patterns > Design Patterns Catalog

J2EE[tm] Design Patterns > Design Patterns Catalog | Devops for Growth | Scoop.it
Each pattern in this catalog includes sample code from Java TM BluePrints reference applications such as the Java Pet Store sample application.
Mickael Ruau's insight:
Pattern NameDescriptionBusiness Delegate [ ACM01]Reduce coupling between Web and Enterprise JavaBeans  TM  tiersComposite Entity [ ACM01]Model a network of related business entitiesComposite View [ ACM01]Separately manage layout and content of multiple composed viewsData Access Object (DAO) [  ACM01]Abstract and encapsulate data access mechanismsFast Lane ReaderImprove read performance of tabular dataFront Controller [ ACM01]Centralize application request processingIntercepting Filter [ ACM01]Pre- and post-process application requestsModel-View-ControllerDecouple data representation, application behavior, and presentationService Locator [ ACM01]Simplify client access to enterprise business servicesSession Facade [ ACM01]Coordinate operations between multiple business objects in a workflowTransfer Object [ ACM01]Transfer business data between tiersValue List Handler [ ACM01]Efficiently iterate a virtual listView Helper [  ACM01]Simplify access to model state and data access logic


No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Core J2EE Patterns - Architect's Diary

Core J2EE Patterns - Architect's Diary | Devops for Growth | Scoop.it
Core J2EE patterns are broadly classified in the following three categories based on the layering of the multi tiered systems. A specific patterns applies to a specific layer of the system under development
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

PreciseJava.com - Best practices to improve performance in J2EE using Patterns

This topic illustrates the performance improvement best practices using Patterns in J2EE with the following sections:
Overview of Patterns
Service Locator
Session Facade
Message Facade
Value Object
Value Object Factory
Value List Handler
Composite Entity
Key Points
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Core Security Patterns: Best Practices and Design strategies for J2EE, Web Services, Identity Management and Service Provisioning - Ramesh Nagappan CISSP, Chris Steel CISSP

Core Security Patterns: Best Practices and Design strategies for J2EE, Web Services, Identity Management and Service Provisioning - Ramesh Nagappan CISSP, Chris Steel CISSP | Devops for Growth | Scoop.it
This book is meant to be a hands-on practitioner's guide to building robust end-to-end security into J2EE enterprise applications, Web services, identity management systems, and service provisioning solutions. It captures a wealth of experience about using patterns-driven and best practices-based approach to building trustworthy IT applications and services. The primary focus of the book is to introduce a security design methodology using a proven set of reusable design patterns, best practices, reality checks, defensive strategies, and assessment checklists that can be applied to securing J2EE applications, Web services, identity management, service provisioning, and personal identification.

The book presents a catalog of 23 new security patterns and 101 best practices, identifying use case scenarios, architectural models, design strategies, 
applied technologies, and validation processes.
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Introduction to SpringBatch and hello Spring Batch tutorial

Introduction to SpringBatch and hello Spring Batch tutorial | Devops for Growth | Scoop.it

A typical general scenario of batch application is as follows:

  • Read a large number of records from a database, file, or queue.
  • Processing data in some way.
  • Write back the data after modification.

Spring Batch automatically performs these batch iteration operations and provides the function of processing similar transactions. IT is usually processed in offline environment without any user interaction. Batch jobs are part of most IT projects, and Spring Batch is the only open source framework that provides powerful enterprise class solutions.

Mickael Ruau's insight:

Flexibility: Spring batch applications are very flexible. Just change the XML file to change the processing order in the application.

Maintainability: Spring Batch applications are easy to maintain. The Spring Batch job includes steps. Each step can be separated, tested and updated without affecting other steps.

Scalability: using partitioning technology, you can scale Spring Batch applications. These techniques allow you to perform the steps of a job in parallel. Execute a single thread in parallel.

Reliability: in case of any failure, the operation can be restarted from the stopped place through the removal procedure.

Support a variety of file formats: Spring Batch supports a large number of writers and readers such as XML, Flat file, CSV, MYSQL, Hibernate, JDBC, Mongo, Neo4j, etc.

There are many ways to start the job: Web application, Java program, command line, etc. can be used to start the Spring Batch job.

In addition, the Spring Batch application supports automatic retrying after failure. Track status and statistics during and after batch processing. Run parallel jobs. Some services, such as logging, resource management, skip and restart processing, etc.

No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Part 1 Batch Processing avec Spring Batch

Cette série de vidéos explique les concepts de base et comment mettre en œuvre Spring Batch pour Data Batch Processing. Elle aborde les éléments suivants :
- Rôle de Spring Batch
- Architecture de Spring Batch
- Concepts de base de Spring Batch (Job, Step, ItemReader, ItemProcessor, ItemWriter, Flow, JobLauncher, JobRepository)
- Chunk Oriented Processing
- Comment créer et configure un Job avec des Steps
- Comment implémenter un exemple de ItemReader avec un fichier CSV
- Comment implémenter un exemple de ItemProcessor
- Comment implémenter un exemple de ItemWriter sur une base de données H2
- Comment créer un pipeline de ItemProcessor en utiliser CompositeItemProcessor
- Comment lancer un Job à travers une API Rest
- Comment exploiter les Jobs
- Etc..

Ketwords : Spring, Spring Batch, Batch Processing, Java,JEE
Bon aprentissage
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Properties (The Java™ Tutorials > Essential Classes > The Platform Environment)

Properties are configuration values managed as key/value pairs. In each pair, the key and value are both String values. The key identifies, and is used to retrieve, the value, much as a variable name is used to retrieve the variable's value. For example, an application capable of downloading files might use a property named "download.lastDirectory" to keep track of the directory used for the last download.

To manage properties, create instances of java.util.Properties. This class provides methods for the following:

  • loading key/value pairs into a Properties object from a stream,
  • retrieving a value from its key,
  • listing the keys and their values,
  • enumerating over the keys, and
  • saving the properties to a stream.
Mickael Ruau's insight:

Properties in the Application Life Cycle

The following figure illustrates how a typical application might manage its configuration data with a Properties object over the course of its execution.

No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Modern Java EE Design Patterns - an O’Reilly book. Download now.

Modern Java EE Design Patterns - an O’Reilly book. Download now. | Devops for Growth | Scoop.it
Download this report to explore best practices for automation, high availability, data separation, and performance while inspecting design patterns such as aggregator, proxy, pipeline, and shared resources to model service interactions.
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Java : Oracle poursuit désormais les entreprises en violation de ses licences pour réclamer le paiement de frais

Java : Oracle poursuit désormais les entreprises en violation de ses licences pour réclamer le paiement de frais | Devops for Growth | Scoop.it
Si Oracle n’a pas encore jeté l’éponge dans son procès contre Google, le géant des bases de données a trouvé un plan B pour renflouer ses caisses : frapper aux portes des clients et partenaires en violation des licences Java pour réclamer les sommes qu’ils doivent. Oracle vient de lancer un message clair : vous vous trompez si vous croyez que Java est gratuit.Six ans après le rachat de Sun Microsystems, l’entreprise qui a développé Java, Oracle procède activement aux audits de clients e
Mickael Ruau's insight:

« Si vous téléchargez Java, vous obtenez tout et vous devez vous assurer que vous installez uniquement les composants auxquels vous avez droit et vous devez supprimer ceux que vous n'utilisez pas », ajoute un autre expert en conformité. Il estime que « l’usage général » dont parle Oracle est vaguement défini, ce qui serait source de beaucoup de différends. « Dès le moment où vous, en tant qu'organisation, livrez quelque chose où Java est distribué aux utilisateurs finals (quelque chose que de plus en plus d'entreprises font en distribuant des applications à travers lesquelles les clients peuvent obtenir des produits et des services), ce n'est pas un usage général … et Oracle veut se faire de l'argent à partir de cela », dit-il.

D’après Guarente, ce n’est pas le seul problème. Le fait est que beaucoup de gens « ne sont pas au courant. Ils pensent que Java est gratuit - parce que c'est open source, donc ils peuvent l'utiliser.

No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Getting Started with Arquillian in NetBeans IDE (Geertjan's Blog)

Getting Started with Arquillian in NetBeans IDE (Geertjan's Blog) | Devops for Growth | Scoop.it

Arquillian is JUnit for Java EE applications. (Plus more.) Read all about its features here.

Mickael Ruau's insight:

Markus Eisele wrote an article about the usage of Arquillian with NetBeans, sometime ago, here:

http://blog.eisele.net/2012/01/arquillian-with-netbeans-glassfish.html

I took a look at Arquillian today, via a new Maven project that Aslak Knutsen from Arquillian has made available here:

https://github.com/aslakknutsen/arquillian-example-helloworld

Simply git the above and then go to File | Open Project in NetBeans and point to the folder that contains the POM. Because NetBeans is smart and able to recognize and parse the POM, it will open the Maven project and visualize its structure automatically, no import process of any kind is needed. P

No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Hibernate-Guidelines - OWASP

Hibernate-Guidelines - OWASP | Devops for Growth | Scoop.it
1 Status
2 Important
2.1 SQL Injection
2.2 Transaction Scope
2.3 Persisting Tainted Data
2.4 Rollback
3 Simple
3.1 Don't use load() to determine existence
3.2 Constructing Query Strings
3.3 Place each class mapping in its own file
3.4 Use bind variables
3.5 Load mappings as resources
3.6 Passwords in the hibernate.cfg.xml in plain text
4 Detailed
4.1 Transaction Timeout
4.2 Identify natural keys
4.3 Parameter Binding
4.4 Declare identifier properties on persistent classes
4.5 Don't use session.find()
4.6 Cache Management and !OutOfMemoryException
4.7 About StatelessSession
4.8 Aboot POJOs
4.9 Session and Concurrency issues
4.10 The equals() and hashCode() problem:
4.11 Using Detached Objects
4.12 Consider externalising query strings
4.12.1 Edge cases are still possibilities!
4.12.2 So how to externalize?
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Integration d'un Batch Talend dans une application J2EE

Integration d'un Batch Talend dans une application J2EE | Devops for Growth | Scoop.it
Ce court tutoriel traite de l’intégration (l’appel)  d’un batch Talend dans une application type Java/J2EE.

Pour commencer nous allons voir comment exporter un projet Talend en Batch
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

Welcome to Core J2EE Patterns!

Welcome to Core J2EE Patterns! | Devops for Growth | Scoop.it
On this site, you will find the entire Java 2 Platform, Enterprise Edition (J2EE) Pattern catalog from the book Core J2EE Patterns: Best Practices and Design Strategies authored by architects from the Sun Java Center. All patterns are published in their entire form from the first edition of the book.
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

JTips

JTips | Devops for Growth | Scoop.it
Ce site a été créé par des consultants en technologies objet, spécialistes de java. Le but principal est de recueillir les informations techniques rassemblées au cours de leurs missions, sous forme de bloc-note.
No comment yet.
Scooped by Mickael Ruau
Scoop.it!

J2EE Design Patterns: Quick Introduction | Javalobby

J2EE Design Patterns: Quick Introduction | Javalobby | Devops for Growth | Scoop.it

A Design Patterns describe an optimal solution to a common recurring design problem within a specific context.

Every author defined Design Patterns in slight variations but the essence is the same. The best in my opinion is by Christopher Alexander – “Each pattern is a three-part rule, which expresses a relation between a certain context, a problem, and a solution”

No comment yet.