background preloader

Java

Facebook Twitter

Etsy/statsd. Ticketfly/pillage. Kamon - Tools for Monitoring Reactive Applications built on top of Akka, Spray and Play! Getting Started. Getting Started will guide you through the process of adding Metrics to an existing application.

Getting Started

We’ll go through the various measuring instruments that Metrics provides, how to use them, and when they’ll come in handy. Setting Up Maven You need the metrics-core library as a dependency: <dependencies><dependency><groupId>io.dropwizard.metrics</groupId><artifactId>metrics-core</artifactId><version>${metrics.version}</version></dependency></dependencies> Note Make sure you have a metrics.version property declared in your POM with the current version, which is 3.1.0.

Now it’s time to add some metrics to your application! Meters A meter measures the rate of events over time (e.g., “requests per second”). Private final Meter requests = metrics.meter("requests"); public void handleRequest(Request request, Response response) { requests.mark(); // etc} This meter will measure the rate of requests in requests per second. Console Reporter Complete getting started So the complete Getting Started is <? To run. Composite Design Pattern. Intent Compose objects into tree structures to represent whole-part hierarchies.

Composite Design Pattern

Composite lets clients treat individual objects and compositions of objects uniformly.Recursive composition"Directories contain entries, each of which could be a directory. "1-to-many "has a" up the "is a" hierarchy Problem Application needs to manipulate a hierarchical collection of "primitive" and "composite" objects. Processing of a primitive object is handled one way, and processing of a composite object is handled differently. Discussion Define an abstract base class (Component) that specifies the behavior that needs to be exercised uniformly across all primitive and composite objects.

Use this pattern whenever you have "composites that contain components, each of which could be a composite". Child management methods [e.g. addChild(), removeChild()] should normally be defined in the Composite class. Structure. Starbucks Does Not Use Two-Phase Commit - Enterprise Integration Patterns. Hotto Cocoa o Kudasai I just returned from a 2 week trip to Japan.

Starbucks Does Not Use Two-Phase Commit - Enterprise Integration Patterns

One of the more familiar sights was the ridiculous number of Starbucks (スターバックス) coffee shops, especially around Shinjuku and Roppongi. Become the best you can be at your profession. If you've stopped learning, you've given up. You’re not going to do Microservices Seems like every 5 to 10 years our industry, especially in the Enterprise Integration, or enterprise application space, we get introduced to some new methodology or architectural style that’s the best since sliced bread and will make you 10x more productive and make your enterprise more agile, flexible, able to respond to change, and whatever [...]

Become the best you can be at your profession. If you've stopped learning, you've given up.

Posted in Uncategorized | No Comments Starting multiple JBoss A-MQ JVMs on the same machine So I haven’t been blogging as much recently — just been really busy. But my New Year’s resolution is to blog a little more sharing some things I come across frequently, even if it’s simple stuff that might help some people out. Posted in Uncategorized | No Comments. Java - Immutability and reordering. Chapter 1. Introduction - Multithreaded Programming with JAVA - Page 1 of 295. ByteBuffer. Java.nio.ByteBuffer is the cornerstone of the nio new I/O package.

ByteBuffer

It is also used for high performance conversions of byte[] to char[] and back. What ByteBuffer is Not. Programmer Level II Exam (The Java™ Tutorials > Bonus > Preparation for Java Programmer Language Certification) This page maps sections in the Java Tutorials to topics covered in the Java SE 7 Programmer II exam.

Programmer Level II Exam (The Java™ Tutorials > Bonus > Preparation for Java Programmer Language Certification)

This exam is associated with the "Oracle Certified Professional, Java SE 7 Programmer" certificate. The topics covered in this exam are: Section 1: Java Class Design Item 1: Use access modifiers: private, protected, public. Mechanical Sympathy. Integration Testing a Spring Boot Application. Spring Boot brings about some welcome defaults configurations that significantly decreases the development time of Spring projects.

Integration Testing a Spring Boot Application

It also has some useful additions when it comes to simplified integration testing. Traditionally, one would use the build script to fire up an embedded container such as Jetty, Tomcat or Cargo, but since a Spring Boot web application already comprises an embedded servlet container some convenient utilities have been created so it can be reused for integration testing. 10 Articles Every Programmer Must Read. Being a Java programmer and Software developer, I have learned a lot from articles titled as What Every Programmer Should Know about ….. , they tend to give a lot of useful and in-depth information about a particular topic, which otherwise is very hard to discover.

10 Articles Every Programmer Must Read

In my quest of learning I have come across some very useful articles, which I have bookmarked for reference and multiple reading. I personally think that all programmer can benefit by reading these articles, which makes me write this post and share all of these “What Every Programmer Should Know” articles with you guys. These are from my personal bookmarks. In this article, you will see classic what every programmer should know article from topics like memory, Unicode, floating point arithmetic,networking, object oriented design, time, URL Encoding, String and many more. This list is very important for beginner and newcomers, as they are the ones, who lacks practical knowledge. Java Anti-Patterns. This page collects some bad code that may not look so obviously bad to beginners.

Java Anti-Patterns

Beginners often struggle with the language syntax. They also have little knowledge about the standard JDK class library and how to make the best use of it. In fact I have collected all examples from everyday junior code. I have modified the original code to give it example character and such that it highlights the problems. 10 Examples of HotSpot JVM Options in Java. There are hundreds of JVM parameters or JVM Options exists inside sun JDK and its virtually impossible to keep track of every single JVM option and based on my experience we don't even use most of JVM flags except couple of important JVM option related to java heap size, java options for printing garbage collection details and most likely JVM switches for setting up remote debugging in Java. but there are many other useful category of JVM parameters which you at least like to be familiar even if not intending to use it more frequently.

10 Examples of HotSpot JVM Options in Java

In this article we will see examples of 10 different categories of JVM parameter which I found useful and use more frequently than other. I would recommend to get a full knowledge of what does a particular JVM options does by referring official list of JVM options. CamelCookbook/camel-cookbook-examples. Undertow · JBoss Community. NoBlogDefFound.

Tunning

Preparation tips for SCJP- Sun Certified Java Programmer Exam. I cleared SCJP 6.0 with 81% on January 25, 2010 (putting this up after a long gap), not a really good score, but happy to get a “PASS” :). I did manage to do some 25 days of preparation (serious preparation), but my coding experience in Java helped me a lot- In understanding the basic concepts easily and giving more time to learn the less used concepts like Generics, Collections, Threading. Through out my preparation and after appearing for the exam there are few things I wanted to share with the aspirants: Which Is the book to be referred?

Java Anti-Patterns. This page collects some bad code that may not look so obviously bad to beginners. Beginners often struggle with the language syntax. They also have little knowledge about the standard JDK class library and how to make the best use of it. The 3 things you should know about hashCode() In Java, every object has a method hashCode that is simple to understand but still it’s sometimes forgotten or misused. Here are three things to keep in mind to avoid the common pitfalls. An object’s hash code allows algorithms and data structures to put objects into compartments, just like letter types in a printer’s type case. The printer puts all “A” types into the compartment for “A”, and he looks for an “A” only in this one compartment.

Java Anti-Patterns. IT Happens Here!: Understanding the Different ApplicationContexts in Spring Application. As a beginner to spring, one might often not know the difference between the several applicationContexts that we use in a spring application. Spring documentation is the best place that can really guide you though the process of completely getting this clarified! But here is the abridged version for a quick understanding of the differences between the various configuration files that we use in a spring application.

Understand that the webapplicationcontext denotes the xml configuration file that is invoked by the DispatcherServlet within the spring enabled web application. This is the xxx-sevlet.xml file where you define the details of the handler mappings, view configuration, controller bean definitions and other web related beans. This also includes the definition of the locale and theme resolvers that you might use within your application. Open Source Rule Engines in Java. Vert.x- Effortless asynchronous application development for the modern web and enterprise. Project Lombok.

400+ Java Interview Questions and Answers blog. Java IAQ: Infrequently Answered Questions. Wouter Coekaerts » Puzzles. [JavaSpecialists 199] - Hacking Java Surreptitiously. Overview. Top 15 java threading interview questions asked in Investment banks. Thread interview questions Java. Vanilla Java. Clean Code: A Handbook of Agile Software Craftsmanship.

Section), Please Wait For 5-8 Second. Then You Can Click On Skip Ads! Button. Clean Code free ebook is divided into three parts. The first describes the principles, patterns, and practices of writing clean code. The second part consists of several case studies of increasing complexity. Clean Code. Whew! Collections.png (PNG Image, 802x915 pixels) An Introduction to Generics in Java > Generic Methods. Factory Chain: A Design Pattern for Factories with Generics by Hugo Troche - developer.*, Developer Dot Star. Java Generics FAQs - Frequently Asked Questions. Domain-Driven Design Community. Roma Framework: The new way to conceive Web Applications. An Introduction to Domain Driven Design. Desarrollo Aplicaciones Web. DDD Sample Application - Introduction.

Javashot - Project Hosting on Google Code. GEF. m2eclipse FAQ. Singleton in Java – the proper way « The guy who does not speak… Efficient way to implement singleton pattern in Java. Www.qi4j.org - www.qi4j.org. Neo4j open source nosql graph database » TinkerPop.